先进行配置的备份
mv /etc/yum.repos.d/CentOS-Base.repo /etc/yum.repos.d/CentOS-Base.repo.backup
先看有没有安装wget wget -V 如果没有执行 yum -y install wget 进行安装
然后执行(这个是centos7的配置安装)
wget -O /etc/yum.repos.d/CentOS-Base.repo http://mirrors.aliyun.com/repo/Centos-7.repo
然后执行
yum clean all
yum makecache
yum update
原文:https://www.cnblogs.com/chengyangyang/p/10273591.html