redhat无法注册RHN的解决办法

1.问题

初学Linux,采用边实战nginx边学Linux命令的方式,这样学习的还快还真实一些.当然,问题来的很快.我使用的是redhat,安装pcre就出现了问题,如下:

1 [root@localhost ~]# yum install pcre plugin plugin plugin 5 This system is not registered with RHN. 6 RHN support will be disabled. 7 Setting up Install Process 8 Setting up repositories 9 No Repositories Available to Set Up10 Reading repository metadata in from local files11 Parsing package install arguments12 Setting up repositories13 No Repositories Available to Set Up14 Reading repository metadata in from local files15 No Match for argument: pcre16 Nothing to do

从5-6行的描述来看,系统还没有注册RHN.网上查了一下整理到这里,当然你经过本人测试过的.大致过程是重新安装CentOS的yum,卸载Redhat的.好吧,继续

2.解决问题过程

1)查看redhat版本.

不同的redhat版本安装的yum不同,所以在这里需要先知道linux的版本.使用命令

1 cat /etc/issue

我的Linux版本为:

1 Red Hat Enterprise Linux Server release 5.1 (Tikanga)2 Kernel \r on an \m

2)卸载yum.

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

执行后等待,后不会有任何提示,不过可以使用命令

1 rpm -qa|grep yum

在卸载前后查看一下yum就可以对比得出,卸载是否有效.

3)安装yum.

从(网址可能会发生变化,请网上找最新的版本)找到对应版本的RPM包,进入,内容是:

1 This directory (and version of CentOS) is depreciated. For normal users,2 you should use /5/ and not /5.1/ in your path. Please see this FAQ3 concerning the CentOS release scheme:If you know what you are doing, and absolutely want to remain at the

大致的意思是使用centos5的版本即可.根据32位还是64位执行不同的命令下载即可.

CentOS5 32位版的:wget wget wget wget 64位版的:wget wget wget wget

下载完成,执行结果如下:

wget http:wget http:wget http:Resolving mirrors.ustc.edu.cn… 202.141.160.110, 2001:da8:d800:95::110 6 Connecting to mirrors.ustc.edu.cn|202.141.160.110|:80… connected. 7 HTTP request sent, awaiting response… 200 OK 8 Length: 34330 (34K) [application/x-redhat-package-manager] 9 Saving to: `python-iniparse-0.2.3-6.el5.noarch.rpm’%[==========================================================================>] 34,330222K/s in 0.2s:[root@localhost ~]# wget http:–Resolving mirrors.ustc.edu.cn… 202.141.160.110, 2001:da8:d800:95::11018 Connecting to mirrors.ustc.edu.cn|202.141.160.110|:80… connected.19 HTTP request sent, awaiting response… 200 OK20 Length: 1034960 (1011K) [application/x-redhat-package-manager]21 Saving to: `yum-3.2.22-40.el5.centos.noarch.rpm’%[==========================================================================>] 1,034,960 410K/s in 2.5s:[root@localhost ~]# wget http:–Resolving mirrors.ustc.edu.cn… 202.141.160.110, 2001:da8:d800:95::11030 Connecting to mirrors.ustc.edu.cn|202.141.160.110|:80… connected.31 HTTP request sent, awaiting response… 200 OK32 Length: 26164 (26K) [application/x-redhat-package-manager]33 Saving to: `yum-metadata-parser-1.1.2-4.el5.i386.rpm’%[==========================================================================>] 26,164125K/s in 0.2s:[root@localhost ~]# wget http:Resolving mirrors.ustc.edu.cn… 202.141.160.110, 2001:da8:d800:95::11041 Connecting to mirrors.ustc.edu.cn|202.141.160.110|:80… connected.42 HTTP request sent, awaiting response… 200 OK43 Length: 21033 (21K) [application/x-redhat-package-manager]44 Saving to: `yum-fastestmirror-1.1.16-21.el5.centos.noarch.rpm’%[===========================================================================================>] 21,033–.-K/s in 0.1s:31:26 (183 KB/s) – `yum-fastestmirror-1.1.16-21.el5.centos.noarch.rpm’ saved [21033/21033]

View Code

安装顺序如下:

于是,月醉了,夜醉了,我也醉了。

redhat无法注册RHN的解决办法

相关文章:

你感兴趣的文章:

标签云: