前些日子发现centos6.8上面的yum没法使用后,经过查证发现是相应镜像版本的yum源不更新了,迫在眉睫之时找到了以下修复方法,亲测超级有用。分享给大家,希望也能解决大家的难题。
1.Yum源修复
[root@hadoop102 ~]# sed -i “s|enabled=1|enabled=0|g” /etc/yum/pluginconf.d/fastestmirror.conf
[root@hadoop102 ~]# mv /etc/yum.repos.d/CentOS-Base.repo /etc/yum.repos.d/CentOS-Base.repo.backup
[root@hadoop102 ~]# curl -o /etc/yum.repos.d/CentOS-Base.repo https://www.xmpan.com/Centos-6-Vault-Aliyun.repo
[root@hadoop102 ~]# yum clean all
[root@hadoop102 ~]# yum makecache