具体问题: 在做yum源更新时候, 报如下错误

1
2
3
4
5
6
7
8
9
10
11
Determining fastest mirrors
* base: mirrors.aliyun.com
* extras: mirrors.aliyun.com
* updates: mirrors.aliyun.com
http://mirrors.aliyun.com/centos/%24releasever/os/x86_64/repodata/repomd.xml: [Errno 14] HTTP Error 404 - Not Found
Trying other mirror.
To address this issue please refer to the below wiki article

https://wiki.centos.org/yum-errors

If above article doesn't help to resolve this issue please use https://bugs.centos.org/.

解决办法https://developer.aliyun.com/mirror/centos?spm=a2c6h.13651102.0.0.3e221b111Mx5i4

下载新的 CentOS-Base.repo 到 /etc/yum.repos.d/,然后将/etc/yum.repos.d/CentOS-Base.repo https://mirrors.aliyun.com/repo/Centos-7.repo中的$releasever变量export到环境中,赋值7(我的是centos7),改完之后再次yum update发现就ok了