错误原因:使用redhat的yum源是需要注册付费的。

1、卸载RedHat自带的yum包

查看已安装的yum

rpm -qa|grep yum

#卸载已安装的yum

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

#再次查看已安装的yum

rpm -qa|grep yum

2.使用国内新的centos的yum包替换redhat自带的

地址如下:
http://mirrors.163.com/centos/

wget http://mirrors.163.com/centos/6/os/x86_64/Packages/yum-metadata-parser-1.1.2-16.el6.x86_64.rpm
wget http://mirrors.163.com/centos/6/os/x86_64/Packages/yum-3.2.29-81.el6.centos.noarch.rpm
wget http://mirrors.163.com/centos/6/os/x86_64/Packages/yum-plugin-fastestmirror-1.1.30-41.el6.noarch.rpm
wget http://mirrors.163.com/centos/6/os/x86_64/Packages/python-urlgrabber-3.9.1-11.el6.noarch.rpm
wget http://mirrors.163.com/centos/6/os/x86_64/Packages/python-iniparse-0.3.1-2.1.el6.noarch.rpm

接着就是分别安装几个包:

[root@upright package]# rpm -ivh python-urlgrabber-3.9.1-11.el6.noarch.rpm
warning: python-urlgrabber-3.9.1-11.el6.noarch.rpm: Header V3 RSA/SHA1 Signature, key ID c105b9de: NOKEY
Preparing...                ########################################### [100%]
   1:python-urlgrabber      ########################################### [100%]
[root@upright package]# rpm -ivh python-iniparse-0.3.1-2.1.el6.noarch.rpm
warning: python-iniparse-0.3.1-2.1.el6.noarch.rpm: Header V3 RSA/SHA256 Signature, key ID c105b9de: NOKEY
Preparing...                ########################################### [100%]
        package python-iniparse-0.3.1-2.1.el6.noarch is already installed
[root@upright package]# rpm -ivh yum-metadata-parser-1.1.2-16.el6.x86_64.rpm
warning: yum-metadata-parser-1.1.2-16.el6.x86_64.rpm: Header V3 RSA/SHA1 Signature, key ID c105b9de: NOKEY
Preparing...                ########################################### [100%]
   1:yum-metadata-parser    ########################################### [100%]

#这2个rpm要一起装!!!

[root@rhel-server download]#rpm -ivh yum-3.2.29-81.el6.centos.noarch.rpm yum-plugin-fastestmirror-1.1.30-40.el6.noarch.rp

当出现报错:
python-urlgrabber >= 3.9.1-10 is needed by yum-3.2.29-81.el6.centos.noarch
发现错误,python-urlgrabber版本必须大于等于3.9.1-10

查看
[root@upright package]# rpm -qa|grep python-url
python-urlgrabber-3.9.1-9.el6.noarch

卸载
[root@upright package]# rpm -e python-urlgrabber-3.9.1-9.el6.noarch
重新安装
[root@upright package]# rpm -ivh yum-plugin-fastestmirror-1.1.30-41.el6.noarch.rpm yum-3.2.29-81.el6.centos.noarch.rpm
warning: yum-plugin-fastestmirror-1.1.30-41.el6.noarch.rpm: Header V3 RSA/SHA1 Signature, key ID c105b9de: NOKEY
Preparing...                ########################################### [100%]
   1:yum                    ########################################### [ 50%]
   2:yum-plugin-fastestmirro########################################### [100%]

3.下载163的repo文件

[root@upright yum.repos.d]# wget http://mirrors.163.com/.help/CentOS6-Base-163.repo
--2019-04-10 02:24:58--  http://mirrors.163.com/.help/CentOS6-Base-163.repo
Resolving mirrors.163.com... 59.111.0.251
Connecting to mirrors.163.com|59.111.0.251|:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: 2006 (2.0K) [application/octet-stream]
Saving to: a€?CentOS6-Base-163.repoa€?

100%[================================================>] 2,006       --.-K/s   in 0s

2019-04-10 02:24:59 (234 MB/s) - a€?CentOS6-Base-163.repoa€? saved [2006/2006]

[root@upright yum.repos.d]# ll
total 20
drwxr-xr-x. 2 root root 4096 Apr 10 01:33 bk
-rw-r--r--. 1 root root 1856 Apr 10 02:27 CentOS6-Base-163.repo
drwxr-xr-x. 2 root root 4096 Apr 10 02:01 package
-rw-r--r--. 1 root root  358 Apr 10 02:28 redhat.repo
-rw-r--r--. 1 root root  406 Apr 10 01:46 redhat.repo.bk

替换文件中的$releasever为版本号6

[root@rhel-server yum.repos.d]# vim CentOS6-Base-163.repo
使用全文替换:
:1,$s/$releasever/6

运行以下命令生成缓存

yum clean all
yum makecache

[root@upright yum.repos.d]# yum clean all
Loaded plugins: fastestmirror, product-id, subscription-manager
This system is not registered to Red Hat Subscription Management. You can use subscription-manager to register.
Cleaning repos: base extras updates
Cleaning up Everything

[root@upright yum.repos.d]# yum makecache
Loaded plugins: fastestmirror, product-id, subscription-manager

This system is not registered to Red Hat Subscription Management. You can use subscription-manager to register.
Determining fastest mirrors
base                                                               | 3.7 kB     00:00     
base/group_gz                                                      | 242 kB     00:00     
base/filelists_db                                                  | 6.4 MB     00:01     
base/primary_db                                                    | 4.7 MB     00:01     
base/other_db                                                      | 2.8 MB     00:00     
extras                                                             | 3.4 kB     00:00     
extras/filelists_db                                                |  24 kB     00:00     
extras/prestodelta                                                 | 2.2 kB     00:00     
extras/primary_db                                                  |  29 kB     00:00     
extras/other_db                                                    |  14 kB     00:00     
updates                                                            | 3.4 kB     00:00     
updates/filelists_db                                               | 2.7 MB     00:01     
updates/prestodelta                                                | 138 kB     00:00     
updates/primary_db                                                 | 3.7 MB     00:00     
updates/other_db                                                   | 193 kB     00:00     
Metadata Cache Created

使用yum时报错 This system is not registered to Red Hat Subscription Management的更多相关文章

  1. RedHat Enterprise Linux 6.4使用yum安装出现This system is not registered to Red Hat Subscription Management

    我虚拟机安装的系统是RedHat Enterprise Linux 6.4-i686,是32位的.使用yum命令安装软件时候出现以下错误: This system is not registered ...

  2. red-hat6.5 yum 源配置,cloud-init 安装 This system is not registered to Red Hat Subscription Management. You can use subscription-manager to register

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

  3. rhel7.0解决:This system is not registered to Red Hat Subscription Management. You can use subscription-manager to register.

    看这篇文章前,先说一下我的实际情况.本来要部署docker服务的,然后yum安装任何软件都不起效果,最后通过老师远程的帮助,最后成功安装上docker,老师的解决办法就是忽略这个问题,直接自己配置网络 ...

  4. Posts Tagged ‘This system is not registered to Red Hat Subscription Management. You can use subscription-manager to register问题的解决办法

    HowTo Install redhat package with YUM command without RHN February 26, 2014 in Redhat / Linux Tips a ...

  5. 【问题】This system is not registered to Red Hat Subscription Management. You can use subscription-manager to register.

    转载请注明出处:https://www.cnblogs.com/kelamoyujuzhen/p/9087725.html  这类问题归根到底就是软件源问题,Linux下安装软件不像windows.L ...

  6. red hat 6.5 红帽企业Linux.6.5 yum This system is not registered to Red Hat Subscription Management. You can use subscription-manager to register. 解决办法

    1.删除redhat原有的yum rpm -aq|grep yum|xargs rpm -e --nodeps 2.下载yum安装文件 wget http://mirrors.163.com/cent ...

  7. How to delete System Profiles for those registered with Red Hat Subscription Management (RHSM)?

    Environment Red Hat Customer Portal Certificate Based Subscription Red Hat Subscription Management ( ...

  8. This system is registered to Red Hat Subscription Management, but is not receiving updates. You can use subscription-manager to assign subscriptions.

    Wrong date and time, reset the date and time in the system properly. It may also happen that system ...

  9. VS2012添加数据库连接时报错,未能加载文件或程序集microsoft.sqlserver.management.sdk.sfc

    今天在VS2012中添加数据库连接时报错 未能加载文件或程序集microsoft.sqlserver.management.sdk.sfc,Version=11.0 查了很多资料,最后下载安装了Sha ...

随机推荐

  1. Eclipse中将web项目自动发布到Tomcat webapps下(转)

    A:FileàDynamic Web Project[工程名:test] B:右键WebContent,New-->Jsp File C:右键test,Run AsàRun on Serverà ...

  2. Python中的包ImportError

    前言 Python中的包给我提供了很好的代码组织,相似的功能模块放在同一个包内,不仅代码结构清晰,而且调用起来也比较方便(可以用*导入) 但是,我们在刚开始使用Python包的时候总是会遇到导入错误& ...

  3. Web版微信协议分析—版本2

    微信web协议分析(微信网页版 wx2.qq.com) 1.打开首页,分配一个随机uuid,2.根据该uuid获取二维码图片.3.微信客户端扫描该图片,在客户端确认登录.4.浏览器不停的调用一个接口, ...

  4. 二、主目录 Makefile 分析(2)

    2.7 编译选项---config.mk 代码 163 164 行 # load other configuration include $(TOPDIR)/config.mk 此段就是包含顶层目录下 ...

  5. WinRar 压缩接压缩文件

    windows  WinRAR 定时压缩文件 命名当天时间 设置时间格式: set "Ymd=%date:~,4%%date:~5,2%%date:~8,2%" 指定 WinRAR ...

  6. pyqt5-键盘事件

    视频教程:https://v.qq.com/x/page/p08592bhsag.html keyPressEvent(QKeyEvent)    键盘按下时调用 keyReleaseEvent(QK ...

  7. JavaScript之函数调用与被调用的上下文对象this

    不同的调用机制决定了函数上下文对象的不同: 1.  作为普通函数进行调用时,其上下文是全局对象window; 2.  作为(对象)方法进行调用时,其上下文对象时拥有该方法的对象; 3.  作为构造器( ...

  8. HTML —— 小记

    标签语义化 所谓标签语义化是要使HTML标签具备很好的可读性,可以清晰传达每个标签所要表达的意义,以方便其被友好的处理和解析(主要针对网络爬虫) 好处: 1.对搜索引擎友好,增加排名权重 2.对用户友 ...

  9. getattr getattribute setattr hasattr delattr

    getattr是返回对象属性value的函数,用法:getattr(object,attribute_name[,default]) 如果对象拥有属性,则返回属性value,如果对象没有该属性并且也没 ...

  10. 从前端和后端两个角度分析jsonp跨域访问(完整实例)

    一.什么是跨域访问 举个栗子:在A网站中,我们希望使用Ajax来获得B网站中的特定内容.如果A网站与B网站不在同一个域中,那么就出现了跨域访问问题.你可以理解为两个域名之间不能跨过域名来发送请求或者请 ...