首页 > 代码库 > 替换yum源时出现的错误

替换yum源时出现的错误

今天在redhat 5.4_64系统替换yum源的时候出现:

[root@mail yum.repos.d]# yum clean metadata

There was a problem importing one of the Python modules

required to run yum. The error leading to this problem was:


   /usr/lib/python2.4/site-packages/_sqlitecache.so: wrong ELF class: ELFCLASS32


Please install a package which provides this module, or

verify that the module is installed correctly.


It‘s possible that the above module doesn‘t match the

current version of Python, which is:

2.4.3 (#1, Jun 11 2009, 14:09:37) 

[GCC 4.1.2 20080704 (Red Hat 4.1.2-44)]


If you cannot solve this problem yourself, please go to 

the yum faq at:

  http://wiki.linux.duke.edu/YumFaq


刚开始我以为是我的python模块的版本低,经过百度一顿分析,原来是我太大意了,因为我的系统是64位的,可笑的是我安装的四个文件分别是:

python-iniparse-0.2.3-6.el5.noarch.rpm

yum-metadata-parser-1.1.2-3.el5.centos.i386.rpm

yum-3.2.22-40.el5.centos.noarch.rpm

yum-fastestmirror-1.1.16-21.el5.centos.noarch.rpm

其中黑色字体的竟然是32位的包,后来全部又从网上下载了一个全新的包,

网址:

http://mirrors.163.com/centos/5/os/x86_64/CentOS/python-iniparse-0.2.3-6.el5.noarch.rpm

http://mirrors.163.com/centos/5/os/x86_64/CentOS/yum-3.2.22-40.el5.centos.noarch.rpm

http://mirrors.163.com/centos/5/os/x86_64/CentOS/yum-fastestmirror-1.1.16-21.el5.centos.noarch.rpm

http://mirrors.163.com/centos/5/os/x86_64/CentOS/yum-metadata-parser-1.1.2-4.el5.x86_64.rpm

卸载原来的yum

[root@mail yum-64]# rpm -qa|grep yum|xargs rpm -e --nodeps

然后从新安装,一些OK了,