yum报错:This system is not registered to Red Hat Subscription Management.解决办法

使用yum安装软件,报错如下:

[root@mariadb ~]# yum -y install mariadb
Loaded plugins: langpacks, product-id, subscription-manager
This system is not registered to Red Hat Subscription Management. You can use subscription-manager to register.
No package mariadb available.
Error: Nothing to do
[root@mariadb ~]# 

解决办法:

使用rpm命令删除当前系统上的yum命令:

[root@mariadb ~]# rpm -e --nodeps yum 

查看系统版本:

[root@mariadb ~]# uname -a
Linux mariadb 3.10.0-229.el7.x86_64 #1 SMP Thu Jan 29 18:37:38 EST 2015 x86_64 x86_64 x86_64 GNU/Linux

[root@mariadb ~]# cat /etc/redhat-release 
Red Hat Enterprise Linux Server release 7.1 (Maipo)
[root@mariadb ~]#  

到如下路径下载对应系统版本的yum安装包:

http://mirrors.aliyun.com/centos/7/os/x86_64/Packages/ 

下载这三个rpm包:

[root@mariadb ~]# wget http://mirrors.aliyun.com/centos/7/os/x86_64/Packages/yum-3.4.3-132.el7.centos.0.1.noarch.rpm
[root@mariadb ~]# wget http://mirrors.aliyun.com/centos/7/os/x86_64/Packages/yum-metadata-parser-1.1.4-10.el7.x86_64.rpm

[root@mariadb ~]# wget http://mirrors.aliyun.com/centos/7/os/x86_64/Packages/yum-plugin-fastestmirror-1.1.31-34.el7.noarch.rpm

安装:

[root@mariadb ~]# rpm -ivh yum-3.4.3-132.el7.centos.0.1.noarch.rpm yum-metadata-parser-1.1.4-10.el7.x86_64.rpm yum-plugin-fastestmirror-1.1.31-34.el7.noarch.rpm 

然后就OK了!

posted on 2018-08-14 14:37  野狼不羁  阅读(15513)  评论(0编辑  收藏  举报

导航