centos7更新失败,提示Could not retrieve mirrorlist http://mirrorlist.centos.org?arch=x86_64&release=7&repo=sclo-rh
    文章作者:恒爱网络 阅读次数:1302 发布时间:2024-8-21

    centos7更新失败,执行 yum update -y 提示Could not retrieve mirrorlist http://mirrorlist.centos.org?arch=x86_64&release=7&repo=sclo-rh 。怀疑是更新源方面出错了,重置为aliyun的源之后还是报错,无法执行更新。

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


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


    最后再次尝试升级

    yum update -y

    显示可以更新了。