PowerRC's Blog

Posted by:
PowerRC

码农,吃货,偶尔飙车和摄影,应该属于危险人物。

4,490

yum 操作时关于repomd.xml文件的 报错

今天在维护一个澳洲的服务器,yum update时发现以下错误

1
2
3
4
5
6
7
8
9
10
11
12
[richard@~ yum.repos.d]# yum update
Loaded plugins: fastestmirror
epel/x86_64/metalink                                                                                                                                                  | 3.4 kB  00:00:00
epel                                                                                                                                                                  | 4.4 kB  00:00:00
http://epel.mirror.digitalpacific.com.au/7/x86_64/repodata/repomd.xml: [Errno -1] repomd.xml does not match metalink for epel
Trying other mirror.
epel                                                                                                                                                                  | 4.4 kB  00:00:00
http://fedora.mirror.serversaustralia.com.au/epel/7/x86_64/repodata/repomd.xml: [Errno -1] repomd.xml does not match metalink for epel
Trying other mirror.
epel                                                                                                                                                                  | 4.4 kB  00:00:00
http://fedora.mirror.uber.com.au/epel/7/x86_64/repodata/repomd.xml: [Errno -1] repomd.xml does not match metalink for epel
Trying other mirror.

错误信息的关键是“repomd.xml does not match metalink for epel"。
大意是指服务器上的repomd.xml文件信息和机器的metalink不匹配。
放狗搜过,一般是由于全球各地epel 镜像服务器有些文件没有正确同步所致,有人说过几个小时就会好(时差缘故?)
最好的解决方法当然就是等镜像服务器同步过来,不过有临时方法可以绕过这个问题:
1、打开/etc/yum.repos.d/epel.repo
2、找到[epel]这个section
3、把baselink前的注视去掉
4、给mirrorlist加上注释

目的就是让yum不去找镜像服务器,直接从美国的主服务器获取update。

版权申明

若文中未注明,则本文由 PowerRC 原创,转载请注明出处。

分享

发表评论

*

code

back up ↑