歡迎來到Linux教程網
Linux教程網
Linux教程網
Linux教程網
Linux教程網 >> Linux基礎 >> Linux教程 >> yum 失敗(This system is not registered with RHN.)解決方法

yum 失敗(This system is not registered with RHN.)解決方法

日期:2017/2/28 15:47:36   编辑:Linux教程

使用RedHat 系統在線安裝時提示This system is not registered with RHN.如下:

[root@localhost ~]# yum install httpd
Loaded plugins: rhnplugin, security
This system is not registered with RHN.
RHN support will be disabled.
Setting up Install Process
No package httpd available.
Nothing to do
解決方案:

1.卸載redhat自帶的yum組件

[root@localhost ~]# rpm -qa|grep yum|xargs rpm -e --nodeps

2.安裝CentOS的yum包

[root@localhost ~]# wget http://centos.ustc.edu.cn/centos/5/os/i386/CentOS/yum-metadata-parser-1.1.2-3.el5.centos.i386.rpm
[root@localhost ~]# wget http://centos.ustc.edu.cn/centos/5/os/i386/CentOS/yum-fastestmirror-1.1.16-16.el5.centos.noarch.rpm
[root@localhost ~]# wget http://centos.ustc.edu.cn/centos/5/os/i386/CentOS/yum-3.2.22-37.el5.centos.noarch.rpm
[root@localhost ~]# rpm -ivh *.rpm
warning: yum-3.2.22-37.el5.centos.noarch.rpm: Header V3 DSA signature: NOKEY, key ID e8562897
Preparing... ########################################### [100%]
1:yum-metadata-parser ########################################### [ 33%]
2:yum-fastestmirror ########################################### [ 67%]
3:yum ########################################### [100%]

3. 下載更新源,並存放在系統目錄中
[root@localhost ~]# wget http://www.linuxidc.com/files/2011/05/06/CentOS-Base.repo

[root@localhost ~]#mv CentOS_Base.repo /etc/yum.repos.d/CentOS-Base.repo

4.生成緩存並進行安裝

[root@localhost ~]# yum makecache
[root@localhost ~]# yum install httpd

Copyright © Linux教程網 All Rights Reserved