Linux 使用開源 yum 報錯 Error performing checksum 解決方法


 

如今開源的yum 有ustc和163。從網上直接下載的repo文件,運行會報錯,手工的修改了一下:web

 

使用的是ustc的yum,配置文件以下:算法

[root@web1 yum.repos.d]# cat ustc.repo sql

 

[base]centos

name=CentOS-5.9 - Base -mirrors.ustc.edu.cnide

baseurl=http://mirrors.ustc.edu.cn/centos/5.9/os/$basearch/google

gpgcheck=0url

enabled=1spa

 

#released updates .net

[updates]3d

name=CentOS-5.9 - Updates -mirrors.ustc.edu.cn

baseurl=http://mirrors.ustc.edu.cn/centos/5.9/updates/$basearch/

gpgcheck=0

enabled=1

 

#additional packages thatmay be useful

[extras]

name=CentOS-5.9 - Extras -mirrors.ustc.edu.cn

baseurl=http://mirrors.ustc.edu.cn/centos/5.9/extras/$basearch/

gpgcheck=0

enabled=1

 

配置好之後,執行yum update,報錯:Error performing checksum

 

[root@web1 yum.repos.d]# yum update

Loaded plugins: katello, product-id,security, subscription-manager

Updating certificate-based repositories.

Unable to read consumer identity

base                                                                                                        | 3.7 kB     00:00    

base/primary_db                                                                                              |4.4 MB     00:02    

http://mirrors.ustc.edu.cn/centos/6.4/os/x86_64/repodata/1e584feac3f3fb76ad4b6fb7e1bc8d44fa124814e9d186dc913ded3c63a216b3-primary.sqlite.bz2:[Errno -3] Error performingchecksum

Trying other mirror.

base/primary_db                                                                                             | 4.4 MB     00:02    

http://mirrors.ustc.edu.cn/centos/6.4/os/x86_64/repodata/1e584feac3f3fb76ad4b6fb7e1bc8d44fa124814e9d186dc913ded3c63a216b3-primary.sqlite.bz2:[Errno -3] Error performing checksum

Trying other mirror.

Error: failure:repodata/1e584feac3f3fb76ad4b6fb7e1bc8d44fa124814e9d186dc913ded3c63a216b3-primary.sqlite.bz2from base: [Errno 256] No more mirrors to try.

 

 

google了一下,說是在rhel 6 中 repomd.xml 文件使用 sha256 做爲hash 算法 ,在rhel 5中 默認使用的是sha 做爲hash 算法。

 

但我是在redhat 5.8 上使用5.9的yum。 也出現了這種錯誤。

 

網上的解決方法是:使用新的sha1 來重建repo:

# createrepo -s sha1 dave-el5-x86_64

 

 

我這裏沒有建立,直接執行以下命令:

# yum clean all

 

 

而後就ok了。  小知識,隨筆記之。

 

 

 

 

 

 

 

 

 

--------------------------------------------------------------------------------------------

版權全部,文章容許轉載,但必須以連接方式註明源地址,不然追究法律責任!

QQ:      251097186

Skype:    tianlesoftware

Email:    tianlesoftware@gmail.com

Blog:     http://blog.csdn.net/tianlesoftware

Weibo:    http://weibo.com/tianlesoftware

Twitter:  http://twitter.com/tianlesoftware

Facebook: http://www.facebook.com/tianlesoftware

Linkedin: http://cn.linkedin.com/in/tianlesoftware

相關文章
相關標籤/搜索