问题:
[root@localhost yum.repos.d]# yum list
Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
WebEx-Tools-2/primary | 6.5 kB 00:00
http://rmc.webex.com/qa/systools/noarch/repodata/primary.xml.gz: [Errno -1] Metadata file does not match checksum
Trying other mirror.
Error: failure: repodata/primary.xml.gz from WebEx-Tools-2: [Errno 256] No more mirrors to try.
原因:
根据/etc/yum.conf配置文件中的cachedir=/var/cache/yum定义了各个连接的下载缓存在本地对应的目录。其中类似*xml.gz就是metadata信息。而repomd.xml就是校验数据。它使用的是sha1进行校验的。只有当*.xml.gz的sha1校验码和repomd.xml中记录的值一样,yum才会认为metadata有效,否则就会报上面的错误。
解决:
方法一:注释掉源。
方法二:替换primary.xml.gz
[root@localhost WebEx-Tools-2]# wget --cache=off http://rmc.webex.com/qa/systools/noarch/repodata/primary.xml.gz
[root@localhost WebEx-Tools-2]# sha1sum primary.xml.gz
f62ae7f7600ae6c7c95a16fab0914891f005e285 primary.xml.gz
[root@localhost WebEx-Tools-2]# vi repomd.xml
<data type="primary">
<location href="repodata/primary.xml.gz"/>
<checksum type="sha">f62ae7f7600ae6c7c95a16fab0914891f005e285</checksum>
<timestamp>1356690899</timestamp>
<open-checksum type="sha">77eb79c9a4b2524fee288d624600138b3cff56da</open-checksum>
</data>