阿里云CentOS Linux 8 - AppStream使用yum安装nfs-utils失败
报错1
Status code: 404 for http://mirrors.cloud.aliyuncs.com/centos/8/AppStream/x86_64/os/repodata/repomd.xml
解决
cd /etc/yum.repos.d/ for i in `ls`;do sed -i 's/mirrors.cloud.aliyuncs.com/mirrors.aliyun.com/g' $i;done for i in `ls`;do sed -i 's/$releasever/$releasever-stream/g' $i;done
报错2
Status code: 404 for https://mirrors.fedoraproject.org/metalink?repo=epel-modular-8-stream&arch=x86_64&infra=stock&content=centos
解决
vim /etc/yum.repos.d/epel-modular.repo 注释这行([epel-modular]里的) metalink=https://mirrors.fedoraproject.org/metalink?repo=epel-modular-$releasever&arch=$basearch&infra=$infra&content=$contentdir 增加这行 baseurl=http://mirrors.cloud.aliyuncs.com/epel/8/Everything/$basearch
最后再安装。