您的位置:首页 > 其它

yum 失败(This system is not registered with RHN.)解决

2013-03-29 13:54 531 查看

使用redhat系统在线安装时提示This system is not registered with RHN.如下:

[root@localhost chenqi]# 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
解决方案:

首先声明一下:我用的是redhat5.0,不同的版本可能不同,需要做适当的调整。

步骤一:卸载redhat自带的yum组件

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

步骤二:安装centos的yum包(依次安装)

[root@localhost chenqi]# wget http://mirrors.ustc.edu.cn/centos/5/os/i386/CentOS/yum-3.2.22-39.el5.centos.noarch.rpm

[root@localhost chenqi]# wget http://centos.ustc.edu.cn/centos/5/os/i386/CentOS/yum-metadata-parser-1.1.2-3.el5.centos.i386.rpm

[root@localhost chenqi]# wget http://mirror.centos.org/centos-5/5/os/i386/CentOS/python-iniparse-0.2.3-4.el5.noarch.rpm

[root@localhost chenqi]# wget http://mirrors.ustc.edu.cn/centos/5/os/i386/CentOS/yum-fastestmirror-1.1.16-21.el5.centos.noarch.rpm

步骤三:安装rpm包
安装顺序

[root@localhost chenqi]# rpm -ivh python-iniparse-0.2.3-4.el5.noarch.rpm

[root@localhost chenqi]# rpm -ivh yum-metadata-parser-1.1.2-3.el5.centos.i386.rpm.4

[root@localhost chenqi]# rpm -ivh yum-3.2.22-39.el5.centos.noarch.rpm.4 yum-fastestmirror-1.1.16-21.el5.centos.noarch.rpm.3

注意:在这个地方第三步一定要两个一起安装,要不然会出现下面的错误:

错误一:warning: yum-3.2.19-18.el5.centos.noarch.rpm: Header V3 DSA signature: NOKEY, key ID e8562897
error: Failed dependencies:
yum-fastestmirror is needed by yum-3.2.19-18.el5.centos.noarch

错误二:warning: yum-fastestmirror-1.1.16-13.el5.centos.noarch.rpm: Header V3 DSA signature: NOKEY, key ID e8562897
error: Failed dependencies:
yum >= 3.0 is needed by yum-fastestmirror-1.1.16-13.el5.centos.noarch

步骤四:下载更新源,并存放在系统目录中
[root@localhost chenqi]# wget http://docs.linuxtone.org/soft/lemp/CentOS-Base.repo

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

到此为止yum就安装成功了
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: