Errors during downloading metadata for repository ‘appstream’ Centos8 yum 失败
问题说明
???? 在使用yum命令下载安装一些包时发现官方源下线导致无法使用。 提示如下错误信息:Errors during downloading metadata for repository ‘appstream’: 错误:为仓库 ‘appstream’ 下载元数据失败 : Cannot download repomd.xml: Cannot download repodata/repomd.xml: All mirrors were tried  ???? 解决方案:将yum更换到最新的阿里源
操作流程
操作流程
???? 进入文件路径查看当前配置文件
cd /etc/yum.repos.d/
 ???? 移除当前配置文件
rm *.repo
ls

???? 从阿里镜像站找到Centos8最新repo文件并复制对应URL地址  ???? 根据URL地址下载repo文件
wget -O /etc/yum.repos.d/CentOS-Base.repo https://mirrors.aliyun.com/repo/Centos-vault-8.5.2111.repo

???? 运行 yum makecache 生成缓存
yum makecache

???? 重新yum命令,已经可以正常使用。(图中执行的是docker安装) 
小结
???? 持续解决遇到的异常问题,不断积累对虚拟环境的了解。
|