错误:failure: repodata/repomd.xml from base: [Errno 256] No more mirrors to try.
http://mirrors.cloud.aliyuncs.com/centos/7/os/x86_64/repodata/repomd.xml: [Errno 14] curl#6 - "Could not resolve host: mirrors.cloud.aliyuncs.com; Unknown error"
1.首先进入 /etc/yum.repos.d 目录
cp CentOS-Base.repo CentOS-Base.repo.bak
2.修改 CentOS-Base.repo 文件
http://mirrors.cloud.aliyuncs.com/centos/ 批量替换为 http://mirrors.aliyun.com/centos/
3.cp epel.repo epel.repo.bak
4.修改epel.repo文件
http://mirrors.cloud.aliyuncs.com/ 批量替换为 http://mirrors.aliyun.com/
之后继续yum就正常了
本文提供了解决CentOS系统中YUM更新时遇到的repodata/repomd.xml错误的方法,通过修改配置文件中的镜像源地址,从阿里云的cloud镜像切换到更稳定的aliyun镜像,有效解决了‘No more mirrors to try’的问题。
1761

被折叠的 条评论
为什么被折叠?



