1 项目场景
CentOS8系统安装好之后,通过yum安装工具
2 问题描述
Error: Failed to download metadata for repo 'AppStream': Cannot download repomd.xml
3 原因分析
与CentOS8的Stream规划有关
4 解决方案
修改yum.repo文件
4.1 单独修改
cd /etc/yum.repos.d
vim CentOS-AppStream.repo
修改releasever为releasever-stream后保存,再次安装
4.2 批量修改
sed -i 's/releasever/releasever-stream/g' /etc/yum.repos.d/CentosOS*
再次安装
参考 https://unix.stackexchange.com/questions/622103/getting-the-correct-repositories-for-a-centos-8-system