1.复制备份:
cp /etc/yum.repos.d/CentOS-Base.repo /etc/yum.repos.d/CentOS-Base.repo.backup
2.下载:
wget -O /etc/yum.repos.d/CentOS-Base.repo http://mirrors.aliyun.com/repo/Centos-7.repo
"-bash: wget: 未找到命令"-解决办法:
yum -y install wget
3.生成缓存:
yum makecache
如果失败 先运行:
yum clean all
来源:https://www.cnblogs.com/ooo0/p/11820781.html