Linux   发布时间:2022-03-31  发布网站:大佬教程  code.js-code.com
大佬教程收集整理的这篇文章主要介绍了Redhat7 更换 centos7 yum源大佬教程大佬觉得挺不错的,现在分享给大家,也给大家做个参考。

概述

错误描述 This system is not registered to Red Hat Subscription Management. You can use subscription-manager to register. 解决步骤 删除redhat原有的yum rpm -aq|grep yum|xargs rpm -e --nodeps 下载yum安装文件 #到这个网站去下载如下RPM

错误描述

This system is not registered to Red Hat Subscription Management. You can use subscription-manager to register. 

解决步骤

删除redhat原有的yum

rpm -aq|grep yum|xargs rpm -e --nodeps 

下载yum安装文件

#到这个网站去下载如下RPM包
http:@H_489_44@//@H_489_44@mirrors.163.com/centos/7/os/x86_64/Packages/
wget http://mirrors.163.com/centos/7/os/x86_64/Packages/yum-3.4.3-163.el7.centos.noarch.rpm
wget http://mirrors.163.com/centos/7/os/x86_64/Packages/yum-Metadata-parser-1.1.4-10.el7.x86_64.rpm
wget http://mirrors.163.com/centos/7/os/x86_64/Packages/yum-plugin-fastestmirror-1.1.31-52.el7.noarch.rpm
wget http://mirrors.163.com/centos/7/os/x86_64/Packages/python-iniparse-0.4-9.el7.noarch.rpm
ll

进行安装yum

rpm -ivh --force --nodeps python-iniparse-0.4-9.el7.noarch.rpm; rpm -ivh --force --nodeps yum-Metadata-parser-1.1.4-10.el7.x86_64.rpm
rpm -ivh --force --nodeps yum-3.4.3-163.el7.centos.noarch.rpm yum-plugin-fastestmirror-1.1.31-52.el7.noarch.rpm
注意:最后两个包必需同时安装,否则会相互依赖

设置源

wget -O /etc/yum.repos.d/CentOS-Base.repo http:@H_489_44@//@H_489_44@mirrors.aliyun.com/repo/Centos-7.repo; cd /etc/yum.repos.d; ll

清除原有缓存

yum clean all

重建缓存,以提高搜索安装软件的速度

yum makecache
如果有提示错误,运行下面的命令:[Errno 14] PYCURL ERROR 22 - "The requested URL returned error: 404 Not Found" 
 
sed -i s/\$releasever/7/ CentOS-Base.repo

 备注:把文件里的$releasever替换为7 最后:重新生成缓存,数字不为0,就OK了

yum clean all; yum makecache

更新系统

yum update

大佬总结

以上是大佬教程为你收集整理的Redhat7 更换 centos7 yum源全部内容,希望文章能够帮你解决Redhat7 更换 centos7 yum源所遇到的程序开发问题。

如果觉得大佬教程网站内容还不错,欢迎将大佬教程推荐给程序员好友。

本图文内容来源于网友网络收集整理提供,作为学习参考使用,版权属于原作者。
如您有任何意见或建议可联系处理。小编QQ:384754419,请注明来意。