执行yum出现:

Loading "fastestmirror" plugin
Config time: 0.086
Running "init" handler for "fastestmirror" plugin
Options Error: invalid boolean value

很明显yum出了问题,直接卸载,重装:

rpm -qa | grep yum
 rpm -e yum-3.2.22-20.el5.centos --nodeps
 wget http://mirrors.aliyun.com/centos/5/os/x86_64/CentOS/yum-3.2.22-40.el5.centos.noarch.rpm
 rpm -ivh yum-3.2.22-40.el5.centos.noarch.rpm
 rpm -e yum-fastestmirror-1.1.16-13.el5.centos --nodeps
 wget http://mirrors.aliyun.com/centos/5/os/x86_64/CentOS/yum-fastestmirror-1.1.16-21.el5.centos.noarch.rpm
 rpm -ivh yum-fastestmirror-1.1.16-21.el5.centos.noarch.rpm
 rpm -e yum-metadata-parser-1.1.2-3.el5.centos --nodeps
 wget http://mirrors.aliyun.com/centos/5/os/x86_64/CentOS/yum-metadata-parser-1.1.2-4.el5.x86_64.rpm
 rpm -ivh yum-metadata-parser-1.1.2-4.el5.x86_64.rpm
 rpm -e yum-updatesd-0.9-2.el5 --nodeps
 wget http://mirrors.aliyun.com/centos/5/os/x86_64/CentOS/yum-updatesd-0.9-5.el5.noarch.rpm
 wget http://mirrors.aliyun.com/centos/5/os/x86_64/CentOS/yum-updatesd-0.9-5.el5.noarch.rpm
 rpm -ivh yum-updatesd-0.9-5.el5.noarch.rpm

再次使用yum:

[root@localhost ~]# yum
 ....
  --obsoletes           enable obsoletes processing during updates
  --noplugins           disable Yum plugins
  --nogpgcheck          disable gpg signature checking
  --disableplugin=[plugin]
                        disable plugins by name
  --enableplugin=[plugin]
                        enable plugins by name
  --skip-broken         skip packages with depsolving problems
  --color=COLOR         control whether color is used
  Plugin Options:

可以看出yum已经正常,但是当我在使用yum list | grep lib是提示:

[root@localhost ~]# yum list | grep lib
Loaded plugins: fastestmirror
Determining fastest mirrors
 * addons: mirrors.btte.net
 * base: mirrors.btte.net
 * extras: mirrors.btte.net
 * updates: mirrors.btte.net
Segmentation fault (core dumped)

关于Segmentation fault (core dumped)这个问题网上有很多讲解,主要是由于zlib的问题,但是按照网上提供的许多方法确实无法解决这个问题,如:

http://www.verydemo.com/demo_c378_i36708.html

***linux/CentOS5_5bushuzlibdaozhiyumshiyongbuliao_baocuoYum_Segmentation_Fault_43436_1356328641.html

但是有一个的处理方法还是挺不错的:

http://www.geedoo.info/yum-prompt-segmentation-fault-core-dumped.html

在/usr/local/lib中:

# ll libz.so*
lrwxrwxrwx 1 root root    13 2013-08-16 libz.so -> libz.so.1.2.7
lrwxrwxrwx 1 root root    13 2013-08-16 libz.so.1 -> libz.so.1.2.7
-rwxr-xr-x 1 root root 96705 2013-08-16 libz.so.1.2.7

要卸载zlib首先必须删除这几个文件

#rm -f libz.so*

注意: 在卸载zlib之前,一定要备份两个文件/lib/libz.so.1和/lib64/libz.so.1两个文件,要不然有些命令将不能执行,如wget,rpm等

备份完后,直接卸载:

rpm -e  zlib-1.2.3-7.el5.x86_64 –nodeps

再次安装:

rpm -ivh zlib-1.2.3-7.el5.x86_64



进行测试:

[root@localhost ~]# yum list | grep zlib
zlib.i386                                  1.2.3-7.el5                 installed
zlib.x86_64                                1.2.3-7.el5                 installed
zlib-devel.i386                            1.2.3-3                     installed
zlib-devel.x86_64                          1.2.3-3                     installed
ghc-zlib.x86_64                            0.5.3.1-7.2.el5             epel    
ghc-zlib-devel.x86_64                      0.5.3.1-7.2.el5             epel    
jzlib.x86_64                               1.0.7-4jpp.1                base    
jzlib-demo.x86_64                          1.0.7-4jpp.1                base    
jzlib-javadoc.x86_64                       1.0.7-4jpp.1                base    
mingw32-zlib.noarch                        1.2.3-12.el5                epel    
mingw32-zlib-static.noarch                 1.2.3-12.el5                epel    
zlib-devel.i386                            1.2.3-7.el5                 base    
zlib-devel.x86_64                          1.2.3-7.el5                 base

搞定!!!