zoukankan      html  css  js  c++  java
  • Linux 使用开源 yum 报错 Error performing checksum 解决方法


    现在开源的yum 有ustc和163。从网上直接下载的repo文件,运行会报错,手工的修改了一下:

    使用的是ustc的yum,配置文件如下:

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

    [base]

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

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

    gpgcheck=0

    enabled=1

    #released updates

    [updates]

    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


  • 相关阅读:
    【WCF--初入江湖】04 WCF通信模式
    【WCF--初入江湖】03 配置服务
    c++输出左右对齐设置
    setw()函数
    clion更改大括号的位置
    emacs org-mode 中文手册精简版(纯小白)
    c++ string 类型 大小写转换 
    C++中string类型的find 函数
    string类型 C++
    统计单词数---单词与空格
  • 原文地址:https://www.cnblogs.com/tianlesoftware/p/3609072.html
Copyright © 2011-2022 走看看