yum报错总结
- 报错信息: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
-
YumRepo Error: All mirror URLs are not using ftp, http[s] or file.centos6 yum失败!
第一种方法:一键修复(一条一条执行即可):
一般执行了前3条命令就好了
Bashsed -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