安装hit时出现HTTP 403错误?

3

问题描述:

使用以下命令在CentOS7上安装软件包:

yum install <package_name>

错误:

# yum install  httpd
Loaded plugins: fastestmirror
http://centos-distro.1gservers.com/7.2.1511/os/x86_64/repodata/repomd.xml: [Errno 14] HTTP Error 403 - Forbidden
Trying other mirror.
To address this issue, please refer to the below knowledge base article

https://access.redhat.com/solutions/69319

If above article doesn't help to resolve this issue, please create a bug on https://bugs.centos.org/

其他信息

>* I can be sure I did not have a proxy setting in /etc/yum.conf. 
>* The firewall is closed. 
>* I already try yum clean all

可能涉及的内容

我已经在/etc/yum.conf中添加了以下两个配置:

timeout=9999
minrate=0

我添加它们是因为有时我会遇到太慢超时错误。如果我从配置中移除这两个,错误将被替换为

# yum install  httpd
Loaded plugins: fastestmirror
http://centos-distro.1gservers.com/7.2.1511/os/x86_64/repodata/repomd.xml: [Errno 12] Timeout on http://centos-distro.1gservers.com/7.2.1511/os/x86_64/repodata/repomd.xml: (28, 'Operation too slow. Less than 1000 bytes/sec transferred the last 30 seconds')
Trying other mirror.

错误信息提供了一个链接,但是这个链接只能被RedHat支持账户阅读。我试着在谷歌上搜索解决方法,但是结果要么没有关联,要么不能解决我的问题。Stack Overflow上也有一篇关于此问题的文章,但是也无法帮助我。

有人能给出一些建议吗?


这个问题与编程无关,实际上应该发布在超级用户而不是Stack Overflow上。 - Michael Gaskill
1个回答

1
我解决了这个问题。这是因为我们实验室的某些外部第三方防火墙阻止了我的访问。
虽然根本原因并不是很重要,但排除故障的方法值得参考。
故障排除
某些 URL 显示 403。所以我将使用以下命令从我的计算机访问该 URL。
curl -i <url>

输出包含http头。它是403。然后我将html主体复制到某个文本文件中。使用Web浏览器打开它。我发现了一些信息,例如:
your orgainization firewall block you

所以...这是我们实验室的网络问题


感谢您的这篇文章。 - pacoverflow

网页内容由stack overflow 提供, 点击上面的
可以查看英文原文,
原文链接