![为什么在 Red Hat Enterprise Linux 和 CentOS 中运行 yum 命令时会收到 [Errno 14] PYCURL 错误 7 - “无法连接到主机”?](https://linux22.com/image/722689/%E4%B8%BA%E4%BB%80%E4%B9%88%E5%9C%A8%20Red%20Hat%20Enterprise%20Linux%20%E5%92%8C%20CentOS%20%E4%B8%AD%E8%BF%90%E8%A1%8C%20yum%20%E5%91%BD%E4%BB%A4%E6%97%B6%E4%BC%9A%E6%94%B6%E5%88%B0%20%5BErrno%2014%5D%20PYCURL%20%E9%94%99%E8%AF%AF%207%20-%20%E2%80%9C%E6%97%A0%E6%B3%95%E8%BF%9E%E6%8E%A5%E5%88%B0%E4%B8%BB%E6%9C%BA%E2%80%9D%EF%BC%9F.png)
运行时yum update
出现以下错误信息
已加载插件:product-id、rhnplugin、security redhat-rhn-satellite-5.5-server-x86_64-6 | 1.6 kB 00:00
https://cdn.redhat.com/content/dist/rhel/server/6/6Server/x86_64/cf-tools/1/os/repodata/repomd.xml:[Errno 14] PYCURL 错误 22 - “请求的 URL 返回错误:403”正在尝试其他镜像。 https://cdn.redhat.com/content/dist/rhel/server/6/6Server/x86_64/rhev-agent/3/os/repodata/repomd.xml:[Errno 14] PYCURL 错误 22 - “请求的 URL 返回错误:403”正在尝试其他镜像。 https://cdn.redhat.com/content/dist/rhel/server/6/6Server/x86_64/os/repodata/repomd.xml: [Errno 14] PYCURL ERROR 22 - “请求的 URL 返回错误:403” 正在尝试其他镜像。错误:无法从 redhat-rhn-satellite-5.5-server-x86_64-6 检索 repodata/e847e0e8ad4903bd2acbbeea4eb487dbd3af3061a40b5a7f074f9e60709d49b7-updateinfo.xml.gz 错误为 [Errno 14] PYCURL ERROR 7 - “无法连接到主机”
Yum 失败并出现错误
错误:无法从 rhel-x86_64-server-6 检索 repodata/c964d1bced53b5fb02369d8429e2d2cd5a8699c6bab094b473f9e830afaa75a7-primary.xml.gz,错误为 [Errno 14] PYCURL 错误 7 - “无法连接到主机”
答案1
mkdir TMP cd TMP
下载的文件如下http://mirror.centos.org/centos/6/os/x86_64/Packages/
centos-indexhtml-6-2.el6.centos.noarch.rpm
python-urlgrabber-3.9.1-11.el6.noarch.rpm
yum-plugin-fastestmirror-1.1.30-40.el6.noarch.rpmcentos-release-6-9.el6.12.3.x86_64.rpm
yum-3.2.29-81.el6.centos.noarch.rpm
yum-插件键-1.1.30-40.el6.noarch.rpm
rpm -e --nodeps redhat-release redhat-indexhtml
yum remove rhnlib abrt-plugin-bugzilla redhat-release-notes*
yum remove subscription-manager
rm /etc/yum.repos.d/*
rpm -Uvh *.rpm
yum clean all
yum update