CentOS加载yum源时报错 [Errno 14] HTTP Error 404 - Not Found Trying other mirror.

报错内容:

[root@192 yum.repos.d]# yum repolist
Loaded plugins: fastestmirror, product-id, search-disabled-repos, subscription-manager
This system is not registered to Red Hat Subscription Management. You can use subscription-manager to register.
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/.

解决办法:

将腾讯yum源仓库的$releasever变量都改为7

命令:vim /etc/yum.repos.d/Centos-Base.repo
vim /etc/yum.repos.d/Centos-Epel.repo

命令::%s/$releasever/7/g #文本编辑器中的替换命令

修改完之后执行:
yum makecache

posted @ 2024-03-23 21:45  郑琰  阅读(855)  评论(1编辑  收藏  举报
#

# #