yum报错总结

yum报错总结

  1. 报错信息:Could not retrieve mirrorlisthttp://mirrorlist.centos.org/?release=6&arch=x86_64&repo=os error was

14: PYCURL ERROR 6 - “Couldn’t resolvehost ‘mirrorlist.centos.org’”

Could not retrieve mirrorlisthttp://mirrorlist.centos.org/?release=6&arch=x86_64&repo=extras errorwas
解决方法:
域名解析不了,yum的配置文件里指向的域名就识别不了了。重新设置下dns指向。

vim /etc/resolv.conf

yum报错总结yum报错总结

  1. YumRepo Error: All mirror URLs are not using ftp, http[s] or file.centos6 yum失败!

    第一种方法:一键修复(一条一条执行即可):
    一般执行了前3条命令就好了
    Bash

    sed -i “s|enabled=1|enabled=0|g” /etc/yum/pluginconf.d/fastestmirror.conf
    mv /etc/yum.repos.d/CentOS-Base.repo /etc/yum.repos.d/CentOS-Base.repo.backup
    curl -o /etc/yum.repos.d/CentOS-Base.repo https://www.xmpan.com/Centos-6-Vault-Aliyun.repo
    yum clean all
    yum makecache

    参考于
    参考于

上一篇:Linux中yum执行yum -y install gcc 报错 解决方案


下一篇:更换yum源为阿里云源