centos7更新提示:Could not retrieve mirrorlist


centos7更新失败,执行yum update -y提示:Could not retrieve mirrorlist http://www.l.com?arch=x86_64&release=7&repo=sclo-rh 。

 

怀疑是更新源方面出错了,更换为aliyun的源之后还是报错,无法执行更新。

执行yum clean all && yum makecache重新生成缓存也报错。

 

查看在/etc/yum.repos.d里面除了新设置的源centos-Base.repo,还有其他 *.repo文件,将其他的*.repo全部删除。

 

重新执行yum clean all && yum makecache重新生成缓存正常。

 

再次尝试升级

yum update -y

更新正常。

© 版权声明
THE END
喜欢就支持一下吧
点赞5 分享