LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   yum remove python (and 630+ dependencies--oops!) (https://www.linuxquestions.org/questions/linux-newbie-8/yum-remove-python-and-630-dependencies-oops-838998/)

griffey 10-19-2010 04:15 AM

yum remove python (and 630+ dependencies--oops!)
 
Hi folks.

A friend of mine did something and I'm a bit stumped. He was having problems with python and python-devel complaining about conflicting versions or some such when he was updating with yum.

I told him (yes, a little of this is my fault) to try removing and reinstalling python and/or python-devel.

Little did I know...

He ran "yum remove python" and it listed over 600 (!) dependent packages to remove as well. Without telling me THAT part he clicked "y" and then watched as yum removed python and all sorts of other stuff (including yum--how's that for irony?) .

I have to go deal with this situation tomorrow morning but he has so blown away this system I almost don't know where to start. Sure I could re-download the rpm of python and reinstall, it but then I'd still have to one-by-one reinstall all the other rpms that were blown away by the python removal with yum.

Any obvious suggestions (other than laughter, of course). And yes, I do take at least partial responsibility for this. But really? 600+ packages and he clicked "y"? Yeesh.

Oh, it's a RHEL 5 machine.

Thanks in advance for any suggestions (or mocking). :)

G.--

jmc1987 10-19-2010 06:43 AM

I don't remember python having so many dependencies. You could try "yum install python" or "yum search python" for all the python listings.

zoomzatag 10-19-2010 06:50 AM

hi griffey,

u can use rpm -evf --nodeps <pakagename>

its removes only the specified package without removing the dependencies....

again try to install the required package


regards,
Zommz

linuxlover.chaitanya 10-19-2010 07:05 AM

Quote:

Originally Posted by jmc1987 (Post 4132348)
I don't remember python having so many dependencies. You could try "yum install python" or "yum search python" for all the python listings.

OP is right. Using yum remove python will completely fsck your system in RHEL/CentOS. More than 600 packages are removed with python. And yum is the one. So it can not be used once python has been removed. Yum, I guess, has been written in python and this is why.

griffey 10-19-2010 09:00 AM

So there's no quick and dirty way to get all of this "back" is sort of what I was getting at.

I guess I'll see if I can't use rpm to get python and yum back and try to rebuild from there.

G.--

proprietor 03-01-2012 07:42 AM

Quote:

Originally Posted by zoomzatag (Post 4132358)
hi griffey,

u can use rpm -evf --nodeps <pakagename>

its removes only the specified package without removing the dependencies....

again try to install the required package


regards,
Zommz

using rpm -evf --nodeps = Don't do a dependency check before installing or upgrading a package. It will not protect you from breaking yum if you uninstall python.

shekhars 05-17-2012 06:18 AM

removed python .. system crashed... is there any rescue method
 
i installed python2.6 on centos 5.8 so as to work with Castalia. But it didnt solved my problem, python -V was showing the same pyhton 2.4 . So i uninstalled the python 2.4, but the system got crashed.

Please help, if there is any rescue or restoration method. please ASAP.


All times are GMT -5. The time now is 11:03 AM.