1.
cd /etc/yum.repos.d
2.移除文件并做好备份
mv /etc/yum.repos.d/CentOS-Base.repo /etc/yum.repos.d/CentOS-Base.repo.backup
3.下载对应版本repo文件:
https://download.csdn.net/download/lucboll/11777821
4.放入/etc/yum.repos.d/文件夹中
5.
yum clean all
6.
yum makecache
解决!
=============================================================================
yum源推荐:
163:http://mirrors.163.com/.help/centos.html
阿里云:https://mirrors.aliyun.com