Yum Metadata file does not match checksum

問題:

[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.gzsha1校驗碼和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>

 

 

 

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章