【发布时间】:2015-09-06 02:51:54
【问题描述】:
平台:CentOS 6.6 版(最终版)
当我尝试 yum install openssl 时,出现此错误:
epel 4 kB 00:00
http://mirror.symnds.com/distributions/fedora-epel/6/x86_64/repodata/repomd.xml: [Errno -1] repomd.xml 与 epel 的金属链接不匹配 尝试其他镜像。
我试过了:yum clean all,yum info kernel。
但我仍然看到类似的错误
宝石 | 4.4 kB 00:00
http://mirror.symnds.com/distributions/fedora-epel/6/x86_64/repodata/repomd.xml: [Errno -1] repomd.xml 与 epel 的 metalink 不匹配 尝试其他镜像。
看起来我无法使用 yum 命令安装任何东西。我也使用了yum clean all 然后yum makecache 但我仍然看到同样的问题。
为什么我会看到这个错误:
[Errno -1] repomd.xml 与 epel 的 metalink 不匹配
我该如何解决?
解决方案: 取消注释 baseurl(或添加 baseurl,如果它不存在)并注释掉镜像列表。这是我在 /etc/yum.repo.d/epel.repo 中的临时解决方法:
[epel]
name=Extra Packages for Enterprise Linux 6 - $basearch
enabled=1
failovermethod=priority
gpgcheck=1
gpgkey=https://dl.fedoraproject.org/pub/epel/RPM-GPG-KEY-EPEL-6
baseurl=http://download.fedoraproject.org/pub/epel/6/$basearch
#mirrorlist=https://mirrors.fedoraproject.org/metalink?repo=epel-6&arch=$basearch
sslverify=true
【问题讨论】:
-
我在 CentOS 7 中遇到了同样的问题。我无法添加答案,因为问题目前已关闭,但在我的情况下,重新启动受影响的主机并重试
yum install ...会有所帮助。 -
对我有用的解决方案是清除元数据和缓存:
yum clean metadata和yum clean allserverfault.com/a/1021274