解决办法:更换源
1.备份旧的源
cd /etc/yum.repos.d/
mkdir repoBack
mv *.repo repoBack/
2. 更新新的源
到阿里云网站 http://mirrors.aliyun.com/repo/
下载对应的repo文件
下载完成后传到 /etc/yum.repos.d/ 目录下
wget -O /etc/yum.repos.d/CentOS-Base.repo https://mirrors.aliyun.com/repo/Centos-vault-8.5.2111.repo
3. 清除旧的yum缓存并生成新的yum缓存
yum clean all
yum makecache
4.更新
yum update