如题,记录报错.
PS:更新于2021.11.12…
原因:
Centos官方已宣布在2020年11月30日停止对Centos6的维护更新,导致yum无法使用,先查看下自己的系统是不是Centos6版本…
解决:
/etc/yum.repos.d目录下有个CentOS-Base.repo文件.把原文件备份,然后新建一个。
内容如下:
# CentOS-Base.repo
#
# The mirror system uses the connecting IP address of the client and the
# update status of each mirror to pick mirrors that are updated to and
# geographically close to the client. You should use this for CentOS updates
# unless you are manually picking other mirrors.
#
# If the mirrorlist= does not work for you, as a fall back you can try the
# remarked out baseurl= line instead.
#
#
[base]
name=CentOS-6.6 - Base
baseurl=http://mirrors.aliyun.com/centos-vault/6.6/os/x86_64/
gpgcheck=1
gpgkey=http://mirrors.aliyun.com/centos-vault/RPM-GPG-KEY-CentOS-6
[updates]
name=CentOS-6.6 - Updates
baseurl=http://mirrors.aliyun.com/centos-vault/6.6/updates/x86_64/
gpgcheck=1
gpgkey=http://mirrors.aliyun.com/centos-vault/RPM-GPG-KEY-CentOS-6
[extras]
name=CentOS-6.6 - Extras
baseurl=http://mirrors.aliyun.com/centos-vault/6.6/extras/x86_64/
gpgcheck=1
gpgkey=http://mirrors.aliyun.com/centos-vault/RPM-GPG-KEY-CentOS-6
[centosplus]
name=CentOS-6.6 - Plus
baseurl=http://mirrors.aliyun.com/centos-vault/6.6/centosplus/x86_64/
gpgcheck=1
enabled=0
gpgkey=http://mirrors.aliyun.com/centos-vault/RPM-GPG-KEY-CentOS-6
[contrib]
name=CentOS-6.6 - Contrib
baseurl=http://mirrors.aliyun.com/centos-vault/6.6/contrib/x86_64/
gpgcheck=1
enabled=0
gpgkey=http://mirrors.aliyun.com/centos-vault/RPM-GPG-KEY-CentOS-6
PS:多少写点关键词,以防参考链接打不开…
其他参考链接:
· 这个博客园整改看不到了…:https://www.cnblogs.com/hillxu/p/14104854.html
· CentOS6 yum源失效官方停止维护更新无法使用及解决办法:https://blog.csdn.net/gianttj/article/details/113632555
· YumRepo Error: All mirror URLs are not using ftp, http[s] or file.:https://blog.csdn.net/qq_39946015/article/details/111086184
· Centos6 yum源…报错解决方法及新的源:https://blog.csdn.net/wojiuwangla/article/details/112186395