Take the 2-minute tour ×
Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

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?

share|improve this question

1 Answer 1

up vote 1 down vote accepted

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

 --nodeps

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.

share|improve this answer
    
How do I get the dependency python(abi) = 2.4? I haven't found this package. –  robjb 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

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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