确定当前系统的架构

[root@jack 桌面]# arch

i686

2 确定下载rpm的源目录

I686说明是32位操作系统,从163的下载网址中选择i386目录

32位地址:http://mirrors.163.com/centos/6/os/i386/Packages/

64位地址:http://mirrors.163.com/centos/6/os/x86_64/Packages/

2.1 需要下载的文件

python-iniparse-0.3.1-2.1.el6.noarch.rpm

python-urlgrabber-3.9.1-11.el6.noarch.rpmyum依赖高版本的rpm包)

yum-3.2.29-73.el6.centos.noarch.rpm

yum-metadata-parser-1.1.2-16.el6.i686.rpm

yum-plugin-fastestmirror-1.1.30-37.el6.noarch.rpm

2.2安装错误的版本异常提示

yum-metadata-parser-1.1.2-16.el6.x86_64.rpm   64位的

yum-metadata-parser-1.1.2-16.el6.i686.rpm    32位的

 

32位操作系统安装64位的yum-metadata-parser异常如下:

rpm-ivh yum-metadata-parser-1.1.2-16.el6.x86_64.rpm 

warning:yum-metadata-parser-1.1.2-16.el6.x86_64.rpm:Header V3 RSA/SHA1 Signature, keyID c105b9de: NOKEY

error:Failed dependencies:

       libc.so.6()(64bit)isneeded by yum-metadata-parser-1.1.2-16.el6.x86_64

       libc.so.6(GLIBC_2.2.5)(64bit)isneeded by yum-metadata-parser-1.1.2-16.el6.x86_64

       libglib-2.0.so.0()(64bit)isneeded by yum-metadata-parser-1.1.2-16.el6.x86_64

       libpthread.so.0()(64bit)isneeded by yum-metadata-parser-1.1.2-16.el6.x86_64

       libpython2.6.so.1.0()(64bit)isneeded by yum-metadata-parser-1.1.2-16.el6.x86_64

       libsqlite3.so.0()(64bit)isneeded by yum-metadata-parser-1.1.2-16.el6.x86_64

       libxml2.so.2()(64bit)isneeded by yum-metadata-parser-1.1.2-16.el6.x86_64

       libxml2.so.2(LIBXML2_2.4.30)(64bit)isneeded by yum-metadata-parser-1.1.2-16.el6.x86_64

简单说明:安装的rpm包依赖64位的C库,说明该系统没有64位的C

3 安装过程

3.1 基本安装步骤

卸载yum

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

 

[root@jack workspace]# rpm -ivh python-iniparse-0.3.1-2.1.el6.noarch.rpm

[root@jack workspace]# rpm -ivh yum-metadata-parser-1.1.2-16.el6.i686.rpm

[root@jack workspace]# rpm -ivh yum-3.2.29-73.el6.centos.noarch.rpm yum-plugin-fastestmirror-1.1.30-37.el6.noarch.rpm

3.2 yum依赖高版本的python-urlgrabber

安装过程中,如果出现如下的错误提示,依赖高版本的python-urlgrabber,需要下载高版本的rpm,然后升级如下:

rpm-ivhyum-plugin-fastestmirror-1.1.30-37.el6.noarch.rpm yum-3.2.29-73.el6.centos.noarch.rpm 

warning:yum-plugin-fastestmirror-1.1.30-37.el6.noarch.rpm:Header V3 RSA/SHA1Signature, key ID c105b9de: NOKEY

error:Failed dependencies:

       python-urlgrabber>=3.9.1-10 is needed by yum-3.2.29-73.el6.centos.noarch

**************************************************************

在很多的教程中,都没有python-urlgrabber-3.9.1-11.el6.noarch.rpm主要是该版本的yum需要依赖高版本的python-urlgrabber,所以需要在安装yum之前进行升级。下载源中的各个软件包的版本未必是一致的,需要进行微调,在最开始的时候还是强制安装python-urlgrabber-3.9.1-11.el6.noarch.rpm

后来才想到rpm命令也有升级功能!!

***************************************************************

指令如下:

[root@jack workspace]# rpm -Uvh python-urlgrabber-3.9.1-11.el6.noarch.rpm