最近给虚拟机安装阿里的yum源的时候在执行yum makecache命令是报错:Loaded plugins: langpacks, product-id, search-disabled-repos, subscription-manager This system is not registered with an entitlement server. You can use subscription-manager to register. http://mirrors.aliyun.com/centos/7Server/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 knowledge base article https://access.redhat.com/articles/1320623 If above article doesn't help to resolve this issue please open a ticket with Red Hat Support.。
后来在网友的帮助下得以解决,在这里给大家复盘一下,顺便分享解决方案。
一、安装阿里yum源(问题复盘)
1、备份原有yum源
mv /etc/yum.repos.d/redhat.repo /etc/yum.repos.d/redhat.repo.backup
2、下载新的阿里yum源
wget -O /etc/yum.repos.d/CentOS-Base.repo http://mirrors.aliyun.com/repo/Centos-7.repo
3、检查
4、清缓存
5、yum makecache(此处开始报错)
[root@192 yum.repos.d]# yum makecache
Loaded plugins: langpacks, product-id, search-disabled-repos, subscription-manager
This system is not registered with an entitlement server. You can use subscription-manager to register.
http://mirrors.aliyun.com/centos/7Server/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 knowledge base article
https://access.redhat.com/articles/1320623
If above article doesn't help to resolve this issue please open a ticket with Red Hat Support.
二、问题解决
编辑CentOS-Base.repo文件,把文件里面的$releasever全部替换为版本号:7最后保存!
%s/$releasever/7/g
如下图所示:
接下来再次执行yum makecache即可
来源地址:https://blog.csdn.net/Gao068465/article/details/128328275