yum的/repodata/repomd.xml错误的解决方法


Error: Failed to download metadata for repo 'epel': Cannot download repomd.xml: Cannot download repodata/repomd.xml: All mirrors were tried


 

方法1:

cd  /etc/yum.repos.d/

vim Centos-报错名

将baseurl 添加一个  https://mirrors.aliyun.com/centos/$releasever/BaseOS/$basearch/os/

还不行:可能之前安装过,重复配置了,删除相关repo文件 即可