I have a corrupted / missing installation of Python on a CentOS 5 server, and yum won't help me reinstall because python is a dependency. When I try installing python-2.4.3-44.el5.x86_64 from the rpm, it informs me that python-libs is required.

But when I try to install python-libs:

[root@myserver]# rpm -ivh http://mirror.centos.org/centos/5/os/x86_64/CentOS/python-libs-2.4.3-44.el5.x86_64.rpm

error: Failed dependencies:
        python(abi) = 2.4 is needed by python-libs-2.4.3-44.el5.x86_64

At this point, I would like to purge any remnants of the old installation from my system, and do a completely clean installation. However, I'm unclear on how to completely remove python, and I haven't been able to find a pythonabi or python-abi package that matches up with version 2.4.3-44.el5.

How should I approach this problem?


Probably what I'd do is first find all the easily identifiable python packages:

 rpm -qa | grep python

Then erase them using

 rpm --erase pkg1 ... pkgn

If there are dependencies flagged, then if you can include these in the packages to be deleted.

You CAN override the dependency checks by including the


flag after the --erase flag on the rpm command line. Not always recommended of course but sometimes necessary.

Then with all the packages downloaded from what ever source you have you then do:

 rpm --install pkg1 ... pkgn

Again, if possible satisfy all the dependencies. But you can override this behavior using the:

 --nodeps --force

flags after the --install flag. Again, not always recommended but sometimes necessary.

  • How do I get the dependency python(abi) = 2.4? I haven't found this package. – Rob Oct 10 '11 at 18:07
  • Its probably not a package but as one of the parts of another package. – mdpc Oct 10 '11 at 18:09
  • 1
    $ rpm -q --whatprovides 'python(abi)' python-2.4.3-27.el5 – Mark Wagner Oct 10 '11 at 19:05

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.