0

There is an error with command yum. I believe it's a difficult problem searching several days without a solution way. I finally decide to reinstall python and yum. I have yet installed python successfully, but unfortunately, failed to install yum.

First, I deleted python and yum from the system based on CentOS6.5

# rpm -qa|grep python|xargs rpm -ev --allmatches --nodeps 
# whereis python |xargs rm -frv
# whereis python 
# rpm -qa|grep yum|xargs rpm -ev --allmatches --nodeps
# whereis yum |xargs rm -frv

Then, I downloaded those files:

-rw-r--r-- 1 root root   77968 Aug 19  2016 python-2.6.6-66.el6_8.x86_64.rpm
-rw-r--r-- 1 root root  176932 Aug 19  2016 python-devel-2.6.6-66.el6_8.x86_64.rpm
-rw-r--r-- 1 root root   37052 Jul  3  2011 python-iniparse-0.3.1-2.1.el6.noarch.rpm
-rw-r--r-- 1 root root 5589812 Aug 19  2016 python-libs-2.6.6-66.el6_8.x86_64.rpm
-rw-r--r-- 1 root root   78448 May 12  2016 python-pycurl-7.19.0-9.el6.x86_64.rpm
-rw-r--r-- 1 root root  343724 Jul  3  2011 python-setuptools-0.6.10-3.el6.noarch.rpm
-rw-r--r-- 1 root root   87660 May 12  2016 python-urlgrabber-3.9.1-11.el6.noarch.rpm
# System need rpm-python 
-rw-r--r-- 1 root root   61520 May 12  2016 rpm-python-4.8.0-55.el6.x86_64.rpm
-rw-r--r-- 1 root root 1042364 Mar 23 23:04 yum-3.2.29-81.el6.centos.noarch.rpm
-rw-r--r-- 1 root root   27224 Sep 26  2011 yum-metadata-parser-1.1.2-16.el6.x86_64.rpm
-rw-r--r-- 1 root root   30484 Mar 23 22:59 yum-plugin-aliases-1.1.30-40.el6.noarch.rpm
-rw-r--r-- 1 root root   33524 Mar 23 23:00 yum-plugin-fastestmirror-1.1.30-40.el6.noarch.rpm
-rw-r--r-- 1 root root   26284 Mar 23 22:59 yum-plugin-protectbase-1.1.30-40.el6.noarch.rpm
-rw-r--r-- 1 root root  115416 Mar 23 23:00 yum-utils-1.1.30-40.el6.noarch.rpm

I ran rpm -Uvh --replacepkgs python*.rpm to successfully reinstall python.

Preparing...                ########################################### [100%]
   1:python-libs            ########################################### [ 14%]
   2:python                 ########################################### [ 29%]
   3:python-pycurl          ########################################### [ 43%]
   4:python-urlgrabber      ########################################### [ 57%]
   5:python-devel           ########################################### [ 71%]
   6:python-iniparse        ########################################### [ 86%]
   7:python-setuptools      ########################################### [100%]

In the final step, I ran rpm -Uvh --replacepkgs rpm-python*.rpm yum*.rpm but it failed. Below is the error message:

error: Failed dependencies:
    rpm = 4.8.0-55.el6 is needed by rpm-python-4.8.0-55.el6.x86_64
    libxml2-python is needed by yum-utils-1.1.30-40.el6.noarch

# rpm --version
RPM version 4.8.0

I can't find anything about rpm = 4.8.0-55.el6, what the hell it is? Hope for your helping, thanks in advance!

0

It means that the rpm-python package is looking for a very specific version of rpm, i.e. rpm-4.8.0-55.el6

  • So how to solve it? I have downloaded rpm-4.8.0-55.el6.x86_64.rpm and tried to run rpm -Uvh rpm-4.8.0-55.el6.x86_64.rpm but there are some errors: error: Failed dependencies: rpm = 4.8.0-27.el6 is needed by (installed) rpm-libs-4.8.0-27.el6.x86_64 rpm = 4.8.0-37.el6 is needed by (installed) rpm-libs-4.8.0-37.el6.x86_64 – Joe Zhow Apr 26 '17 at 1:58

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.