过去几天我一直遇到这个错误。当我执行“yum update”或基本上任何“yum”命令时,它都会超时并花费很长时间或基本上停止。我使用 Google 上的每一个方法寻找解决方案,但都没有帮助。这是我的设置:
VMware ESXI 6.5 主机它是在 OVH 网络上运行的 CentOS 7 虚拟机。
这是我执行 yum update 时给出的信息...
Total download size: 100 M
Is this ok [y/d/N]: y
Downloading packages:
Delta RPMs disabled because /usr/bin/applydeltarpm not installed.
warning: /var/cache/yum/x86_64/7/updates/packages/NetworkManager-libnm-1.4.0-20.el7_3.x86_64.rpm: Header V3 RSA/SHA256 Signature, key ID f4a80eb5: NOKEY
Public key for NetworkManager-libnm-1.4.0-20.el7_3.x86_64.rpm is not installed
(1/71): NetworkManager-libnm-1.4.0-20.el7_3.x86_64.rpm | 443 kB 00:00
(2/71): NetworkManager-team-1.4.0-20.el7_3.x86_64.rpm | 147 kB 00:00
NetworkManager-tui-1.4.0-20.el FAILED
http://centos.mirror.iweb.ca/7.3.1611/updates/x86_64/Packages/NetworkManager-tui-1.4.0-20.el7_3.x86_64.rpm: [Errno 14] curl#7 - "Failed to connect to 2607:f748:10:12:0:ce17:705:1: Network is unreachable"
Trying other mirror.
(3/71): NetworkManager-wifi-1.4.0-20.el7_3.x86_64.rpm | 176 kB 00:00
NetworkManager-1.4.0-20.el7_3. FAILED
http://centos.mirror.iweb.ca/7.3.1611/updates/x86_64/Packages/NetworkManager-1.4.0-20.el7_3.x86_64.rpm: [Errno 12] Timeout on http://centos.mirror.iweb.ca/7.3.1611/updates/x86_64/Packages/NetworkManager-1.4.0-20.el7_3.x86_64.rpm: (28, 'Connection timed out after 30000 milliseconds')
Trying other mirror.
(4/71): audit-2.6.5-3.el7_3.1.x86_64.rpm | 233 kB 00:00
(5/71): audit-libs-2.6.5-3.el7_3.1.x86_64.rpm | 85 kB 00:00
bash-4.2.46-21.el7_3.x86_64.rp FAILED
http://centos.mirror.iweb.ca/7.3.1611/updates/x86_64/Packages/bash-4.2.46-21.el7_3.x86_64.rpm: [Errno 12] Timeout on http://centos.mirror.iweb.ca/7.3.1611/updates/x86_64/Packages/bash-4.2.46-21.el7_3.x86_64.rpm: (28, 'Connection timed out after 30001 milliseconds')
Trying other mirror.
(6/71): bind-libs-lite-9.9.4-38.el7_3.3.x86_64.rpm | 730 kB 00:00
(7/71): bind-license-9.9.4-38.el7_3.3.noarch.rpm | 83 kB 00:00
(8/71): ca-certificates-2017.2.14-70.1.el7_3.noarch.rpm | 438 kB 00:00
(9/71): chkconfig-1.7.2-1.el7_3.1.x86_64.rpm | 175 kB 00:00
(10/71): chrony-2.1.1-4.el7.centos.x86_64.rpm | 281 kB 00:00
device-mapper-1.02.135-1.el7_3 FAILED
http://centos.mirror.iweb.ca/7.3.1611/updates/x86_64/Packages/device-mapper-1.02.135-1.el7_3.5.x86_64.rpm: [Errno 12] Timeout on http://centos.mirror.iweb.ca/7.3.1611/updates/x86_64/Packages/device-mapper-1.02.135-1.el7_3.5.x86_64.rpm: (28, 'Connection timed out after 30001 milliseconds')
Trying other mirror.
device-mapper-libs-1.02.135-1. FAILED
http://centos.mirror.iweb.ca/7.3.1611/updates/x86_64/Packages/device-mapper-libs-1.02.135-1.el7_3.5.x86_64.rpm: [Errno 12] Timeout on http://centos.mirror.iweb.ca/7.3.1611/updates/x86_64/Packages/device-mapper-libs-1.02.135-1.el7_3.5.x86_64.rpm: (28, 'Resolving timed out after 30540 milliseconds')
Trying other mirror.
dmidecode-3.0-2.1.el7_3.x86_64 FAILED
http://centos.mirror.iweb.ca/7.3.1611/updates/x86_64/Packages/dmidecode-3.0-2.1.el7_3.x86_64.rpm: [Errno 14] curl#6 - "Could not resolve host: centos.mirror.iweb.ca; Name or service not known"
Trying other mirror.
dracut-033-463.el7_3.2.x86_64. FAILED
http://centos.mirror.iweb.ca/7.3.1611/updates/x86_64/Packages/dracut-033-463.el7_3.2.x86_64.rpm: [Errno 12] Timeout on http://centos.mirror.iweb.ca/7.3.1611/updates/x86_64/Packages/dracut-033-463.el7_3.2.x86_64.rpm: (28, 'Resolving timed out after 30539 milliseconds')
Trying other mirror.
dracut-config-rescue-033-463.e FAILED
http://centos.mirror.iweb.ca/7.3.1611/updates/x86_64/Packages/dracut-config-rescue-033-463.el7_3.2.x86_64.rpm: [Errno 14] curl#7 - "Failed to connect to 2607:f748:10:12:0:ce17:705:1: Network is unreachable"
Trying other mirror.
firewalld-0.4.3.2-8.1.el7_3.3. FAILED
http://centos.mirror.colo-serv.net/7.3.1611/updates/x86_64/Packages/firewalld-0.4.3.2-8.1.el7_3.3.noarch.rpm: [Errno 14] curl#7 - "Failed to connect to 2001:19c0:e:13::23: Network is unreachable"
Trying other mirror.
firewalld-filesystem-0.4.3.2-8 FAILED
http://centos.mirror.vexxhost.com/7.3.1611/updates/x86_64/Packages/firewalld-filesystem-0.4.3.2-8.1.el7_3.3.noarch.rpm: [Errno 14] curl#7 - "Failed to connect to 2604:e100:1:0:f816:3eff:fe28:88d0: Network is unreachable"
Trying other mirror.
(11/71): gawk-4.0.2-4.el7_3.1.x86_64.rpm | 874 kB 00:00
(12/71): glibc-2.17-157.el7_3.4.x86_64.rpm | 3.6 MB 00:00
expat-2.1.0-10.el7_3.x86_64.rp FAILED
http://centos.mirror.netelligent.ca/centos/7.3.1611/updates/x86_64/Packages/expat-2.1.0-10.el7_3.x86_64.rpm: [Errno 12] Timeout on http://centos.mirror.netelligent.ca/centos/7.3.1611/updates/x86_64/Packages/expat-2.1.0-10.el7_3.x86_64.rpm: (28, 'Connection timed out after 30001 milliseconds')
Trying other mirror.
grubby-8.28-21.el7_3.x86_64.rp FAILED
http://centos.mirror.iweb.ca/7.3.1611/updates/x86_64/Packages/grubby-8.28-21.el7_3.x86_64.rpm: [Errno 14] curl#7 - "Failed to connect to 2607:f748:10:12:0:ce17:705:1: Network is unreachable"
Trying other mirror.
(13/71): irqbalance-1.0.7-6.el7_3.1.x86_64.rpm | 44 kB 00:00
(14/71): kernel-3.10.0-514.26.2.el7.x86_64.rpm | 37 MB 00:01
(15/71): kernel-tools-3.10.0-514.26.2.el7.x86_64.rpm | 4.0 MB 00:00
dracut-network-033-463.el7_3.2 FAILED
http://centos.mirror.ca.planethoster.net/7.3.1611/updates/x86_64/Packages/dracut-network-033-463.el7_3.2.x86_64.rpm: [Errno 12] Timeout on http://centos.mirror.ca.planethoster.net/7.3.1611/updates/x86_64/Packages/dracut-network-033-463.el7_3.2.x86_64.rpm: (28, 'Resolving timed out after 30539 milliseconds')
Trying other mirror.
glibc-common-2.17-157.el7_3.4. FAILED
http://centos.mirror.netelligent.ca/centos/7.3.1611/updates/x86_64/Packages/glibc-common-2.17-157.el7_3.4.x86_64.rpm: [Errno 12] Timeout on http://centos.mirror.netelligent.ca/centos/7.3.1611/updates/x86_64/Packages/glibc-common-2.17-157.el7_3.4.x86_64.rpm: (28, 'Connection timed out after 30001 milliseconds')
Trying other mirror.
initscripts-9.49.37-1.el7_3.1. FAILED
http://centos.mirror.iweb.ca/7.3.1611/updates/x86_64/Packages/initscripts-9.49.37-1.el7_3.1.x86_64.rpm: [Errno 14] curl#7 - "Failed to connect to 2607:f748:10:12:0:ce17:705:1: Network is unreachable"
Trying other mirror.
krb5-libs-1.14.1-27.el7_3.x86_ FAILED
http://centos.mirror.iweb.ca/7.3.1611/updates/x86_64/Packages/krb5-libs-1.14.1-27.el7_3.x86_64.rpm: [Errno 14] curl#7 - "Failed to connect to 2607:f748:10:12:0:ce17:705:1: Network is unreachable"
Trying other mirror.
kernel-tools-libs-3.10.0-514.2 FAILED
http://centos.mirror.ca.planethoster.net/7.3.1611/updates/x86_64/Packages/kernel-tools-libs-3.10.0-514.26.2.el7.x86_64.rpm: [Errno 12] Timeout on http://centos.mirror.ca.planethoster.net/7.3.1611/updates/x86_64/Packages/kernel-tools-libs-3.10.0-514.26.2.el7.x86_64.rpm: (28, 'Connection timed out after 30001 milliseconds')
Trying other mirror.
kpartx-0.4.9-99.el7_3.3.x86_64 FAILED
http://centos.mirror.ca.planethoster.net/7.3.1611/updates/x86_64/Packages/kpartx-0.4.9-99.el7_3.3.x86_64.rpm: [Errno 14] curl#6 - "Could not resolve host: centos.mirror.ca.planethoster.net; Name or service not known"
Trying other mirror.
(16/71): libblkid-2.23.2-33.el7_3.2.x86_64.rpm | 170 kB 00:10
libgcrypt-1.5.3-13.el7_3.1.x86 FAILED
http://centos.mirror.iweb.ca/7.3.1611/updates/x86_64/Packages/libgcrypt-1.5.3-13.el7_3.1.x86_64.rpm: [Errno 14] curl#7 - "Failed to connect to 2607:f748:10:12:0:ce17:705:1: Network is unreachable"
Trying other mirror.
libgudev1-219-30.el7_3.9.x86_6 FAILED
http://centos.mirror.ca.planethoster.net/7.3.1611/updates/x86_64/Packages/libgudev1-219-30.el7_3.9.x86_64.rpm: [Errno 12] Timeout on http://centos.mirror.ca.planethoster.net/7.3.1611/updates/x86_64/Packages/libgudev1-219-30.el7_3.9.x86_64.rpm: (28, 'Connection timed out after 30001 milliseconds')
Trying other mirror.
(17/71): libmount-2.23.2-33.el7_3.2.x86_64.rpm | 172 kB 00:00
libnetfilter_conntrack-1.0.6-1 FAILED
http://centos.mirror.ca.planethoster.net/7.3.1611/updates/x86_64/Packages/libnetfilter_conntrack-1.0.6-1.el7_3.x86_64.rpm: [Errno 12] Timeout on http://centos.mirror.ca.planethoster.net/7.3.1611/updates/x86_64/Packages/libnetfilter_conntrack-1.0.6-1.el7_3.x86_64.rpm: (28, 'Connection timed out after 30001 milliseconds')
Trying other mirror.
(18/71): libnl3-3.2.28-3.el7_3.x86_64.rpm | 278 kB 00:00
非常感谢您的帮助。
答案1
看起来是 IPv6 连接问题(将 ip_resolve=ipv4 添加到 /etc/yum.conf 以强制仅使用 IPv4)。如果这不起作用,可能是 gpg 密钥验证失败。尝试 IPv4 选项。
答案2
您的 VPS 上似乎未正确配置 IPv6。您应该在 VPS 上完成 IPv6 配置(请联系 OVH 获取相关帮助)。
答案3
检查互联网连接和带宽并尝试以下操作:
yum clean all
yum check
yum erase apf
yum upgrade