All mirror URLs are not using ftp, http[s] or file

今天要yum点东西到服务器上,然后本地centos6用yum下载包,就报了All mirror URLs are not using ftp, http[s] or file.一顿操作猛如虎,一看效果0.5。终于还是万能的度娘告诉我因为centos6的支持给官方停掉了......

这样:

据说还有这样:

那你就这样做:

1.sed -i "s|enabled=1|enabled=0|g" /etc/yum/pluginconf.d/fastestmirror.conf

2.mv /etc/yum.repos.d/CentOS-Base.repo /etc/yum.repos.d/CentOS-Base.repo.backup

3.curl -o /etc/yum.repos.d/CentOS-Base.repo https://www.xmpan.com/Centos-6-Vault-Aliyun.repo

4.yum clean all

5.yum makecache

然后你就会发现问题就解决了

 

 

 

https://zhuanlan.zhihu.com/p/338873211

posted on 2022-01-28 15:43  lansedongqing  阅读(226)  评论(0编辑  收藏  举报

导航