上一篇 下一篇 分享链接 返回 返回顶部

centos7更新Could not retrieve

发布人:杨俊杰 发布时间:2024-09-09 09:34 阅读量:1009

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

更新正常。

目录结构
全文