使用以下命令在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支持帐户读取。我试过谷歌搜索,但结果要么没有相关或无法解决我的问题。堆栈溢出也有一个关于此的帖子。但它也没有帮助。
有人可以提供一些建议吗?
答案 0 :(得分:1)
我解决了这个问题。这是因为我实验室的一些外部第三方防火墙阻止了我。
虽然根本原因不是很有意义,但是拍摄麻烦的方法值得一提。参考。curl -i <url>
输出包含http标头。它是403.然后我将html主体复制到一些文本文件。使用Web Broswer打开它。我找到了一些信息:
your orgainization firewall block you
所以......这是我实验室的网络问题