今天在服务器使用yum命令的时候,报错‘Failed to download metadata for repo AppStream : Cannot download repomd.xml: Cannot download repodata/repomd.xml: All mirrors were tried
’
问题主要缘由
CentOS-8在2021年12月31日停止了源的服务
使用如下命令查看系统是不是8
cat /etc/redhat-release

就解决步骤
1、打开/etc/yum.repos.d文件夹
cd /etc/yum.repos.d
2、新建bak文件夹并将文件拷贝进其中
mkdir bak
cp * bak/
执行这个命令可能会报错,无视就好

3、使用以下命令进行内容的替换
sed -i s/$releasever/8-stream/ CentOS*repo
然后就可以接着执行你刚才的命令,推荐直接复制上面三个命令。
相关博文
【Bug解决】CentOS-8中“Failed to download metadata for repo ‘AppStream‘: Cannot download repomd.xml”_陈同学的博客-CSDN博客
© 版权声明
文章版权归作者所有,未经允许请勿转载。如内容涉嫌侵权,请在本页底部进入<联系我们>进行举报投诉!
THE END
















暂无评论内容