Linux Yum failed to resolve
Problem:
In CentOS 5.5, you need to use the Yum installer and an error occurred:
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
Install a package which provides this module, or
Verify the module is installed correctly.
Workaround:
Let the dog search, because the Python version is incompatible, the way is to uninstall the original Yum reinstall;
1. Determine the current CentOS version
[Email protected]centos-74 yum.repos.d]# lsb_release-a
LSB Version:: core-3.1-amd64:core-3.1-ia32:core-3.1-noarch:graphics-3.1-amd64:graphics-3.1-ia32: Graphics-3.1-noarch
Distributor Id:centos
Description:centos Release 5.5 (Final)
release:5.5
Codename:final
You can see that the current CentOS version is 5.5;
[Email protected] yum.repos.d]# uname-a
Linux centos-74 2.6.18-194.el5 #1 SMP Fri Apr 2 14:58:14 EDT. x86_64 x86_64 x86_64 Gnu/linux
You can see that the x86_64 system is installed;
2. Installing the Yum Program
2.1 Download the required RPM package from NetEase's mirrors;
wget http://mirrors.163.com/centos/5/os/x86_64/CentOS/python-iniparse-0.2.3-4.el5.noarch.rpm
The file from NetEase's site has not been downloaded, Only python-iniparse-0.2.3-6.el5.noarch.rpm, but python-iniparse-0.2.3-6.el5.noarch.rpm will have compatibility issues with three other files, so let the dog search and download it from somewhere else python-i niparse-0.2.3-4.el5.noarch.rpm
wget http://mirrors.163.com/centos/5/os/x86_64/CentOS/yum-3.2.22-40.el5.centos.noarch.rpm
wget http://mirrors.163.com/centos/5/os/x86_64/CentOS/yum-fastestmirror-1.1.16-21.el5.centos.noarch.rpm
wget http://mirrors.163.com/centos/5/os/x86_64/CentOS/yum-metadata-parser-1.1.2-4.el5.centos.x86_64.rpm
2.2 Installing packages that have already been downloaded
RPM-IVH--nodeps python-iniparse-0.2.3-4.el5.noarch.rpm yum-3.2.22-40.el5.centos.noarch.rpm yum-metadata-parser-1.1.2-4.el5.centos.x86_64.rpm yum-fastestmirror-1.1.16-21.el5.centos.noarch.rpm
For some reason, only the first package is installed when the above command is completed python-iniparse-0.2.3-4.el5.noarch.rpm
Preparing ... ########################################### [100%]
Package Python-iniparse-0.2.3-4.el5.noarch is already installed
Install the remaining packages again,
RPM-IVH--nodeps yum-3.2.22-40.el5.centos.noarch.rpm yum-metadata-parser-1.1.2-4.el5.centos.x86_64.rpm yum-fastestmirror-1.1.16-21.el5.centos.noarch.rpm
Preparing ... ########################################### [100%]
1:yum-metadata-parser ########################################### [33%]
2:yum-fastestmirror ########################################### [67%]
3:yum ########################################### [100%]
by Command Rpm-qa | grep Yum View Installation Results
[Email protected] zhao]# Rpm-qa|grep Yum
Yum-3.2.22-40.el5.centos
Yum-fastestmirror-1.1.16-21.el5.centos
Yum-metadata-parser-1.1.2-4.el5
[Email protected] zhao]#
Import Certificate
Rpm-import http://mirrors.163.com/centos/RPM-GPG-KEY-CentOS-5
Let Yum use the source of NetEase:
#cd/etc/yum.repos.d/
#wget Http://mirrors.163.com/.help/CentOS-Base-163.repo
Edit Centos-base-163.repo, add # to all mirrorlist, replace all $releasever with 5, then save.
#yum Clean Metadata
Yum will work after completion, update yum
#yum-y Upgrade
- This article is from: Linux Learning Network
Linux Yum failed to resolve