一波四折,蜀道难,难于上青天。
原因是因为 CentOS8 停服
不用试这个了,没用
cd /etc/yum.repos.d
vim CentOS-Base.repo
[BaseOS]
baseurl=https://mirrors.aliyun.com/centos/$releasever/BaseOS/$basearch/os/
gpgcheck=1
enabled=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-centosofficial
重点来了,下面是有用的方案
cd /etc/yum.repos.d
删除所有 Centos 开头的文件,然后重新wget -O /etc/yum.repos.d/CentOS-Base.repo https://mirrors.aliyun.com/repo/Centos-vault-8.5.2111.repo