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了!


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM