问题描述:Centos 8 不在系统维护,第三方的镜像站中均已移除CentOS 8的源,yum install 会报错建议更换源。

CentOS Linux release 8.5更换阿里yum源_yum

  执行以下操作即可解决:

[root@localhost yum.repos.d]# wget https://mirrors.aliyun.com/repo/Centos-vault-8.5.2111.repo -O /etc/yum.repos.d/Centos-vault-8.5.2111.repo
[root@localhost yum.repos.d]# wget https://mirrors.aliyun.com/repo/epel-archive-8.repo -O /etc/yum.repos.d/epel-archive-8.repo
[root@localhost yum.repos.d]# yum clean all && yum makecache

[root@localhost yum.repos.d]# wget -O /etc/yum.repos.d/CentOS-Base.repo https://mirrors.aliyun.com/repo/Centos-8.repo
[root@localhost yum.repos.d]# yum install -y epel-release
[root@localhost yum.repos.d]# yum clean all
[root@localhost yum.repos.d]# rpm --rebuilddb
[root@localhost yum.repos.d]# yum makecache