标题: 问题解决:Failed to download metadata for repo ‘appstream‘ [打印本页] 作者: linda 时间: 2024-6-27 16:08 标题: 问题解决:Failed to download metadata for repo ‘appstream‘
大家都知道Centos8于2021年年底停止了服务,大家再在使用yum源安装时候,出现下面错误“错误:Failed to download metadata for repo ‘AppStream’: Cannot prepare internal mirrorlist: No URLs in mirrorlist”
1、进入yum的repos目录
cd /etc/yum.repos.d/
2、修改所有的CentOS文件内容
sed -i 's/mirrorlist/#mirrorlist/g' /etc/yum.repos.d/CentOS-*
sed -i 's|#baseurl=http://mirror.centos.org|baseurl=http://vault.centos.org|g' /etc/yum.repos.d/CentOS-*