- 运行以下命令备份之前的repo文件。
rename '.repo' '.repo.bak' /etc/yum.repos.d/*.repo
- 下载可以正常使用的.repo文件
wget -O /etc/yum.repos.d/CentOS-Base.repo https://mirrors.aliyun.com/repo/Centos-vault-8.5.2111.repo
- 运行yum makecache
rename '.repo' '.repo.bak' /etc/yum.repos.d/*.repo
wget -O /etc/yum.repos.d/CentOS-Base.repo https://mirrors.aliyun.com/repo/Centos-vault-8.5.2111.repo