1、备份当前的yum源
mv /etc/yum.repos.d /etc/yum.repos.d.backup
2、下载阿里云的镜像源
wget -O /etc/yum.repos.d/CentOS-Base.repo http://mirrors.aliyun.com/repo/Centos-6.repo
3、清除并生成缓存
yum clean all
yum makecache
生成缓存出问题的请看这里
如果提示找不到 yum.repos.d文件夹的话就自己新建个
微信扫一扫
mv /etc/yum.repos.d /etc/yum.repos.d.backup
wget -O /etc/yum.repos.d/CentOS-Base.repo http://mirrors.aliyun.com/repo/Centos-6.repo
yum clean all
yum makecache
生成缓存出问题的请看这里
如果提示找不到 yum.repos.d文件夹的话就自己新建个
相关推荐