问题描述:
用yum给服务器装Nginx提示
Errors during downloading metadata for repository 'AppStream': Status code: 404 for https://repo.huaweicloud.com/centos/8/AppStream/x86_64/os/repodata/repomd.xml (IP: 61.172.237.154) Error: Failed to download metadata for repo 'AppStream': Cannot download repomd.xml: Cannot download repodata/repomd.xml: All mirrors were tried
尝试过重装Centos也不行
原因分析:
yum 源地址错误
解决方案:
替换成新镜像源:
sed -i "s@https://repo.huaweicloud.com@https://repo.huaweicloud.com/centos-vault@g" /etc/yum.repos.d/CentOS*repo
再重新缓存到本地
yum makecache