LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Red Hat (https://www.linuxquestions.org/questions/red-hat-31/)
-   -   I broke my yum by installing Python 2.7 on CentOS (https://www.linuxquestions.org/questions/red-hat-31/i-broke-my-yum-by-installing-python-2-7-on-centos-4175447956/)

jhaprade 01-31-2013 03:24 AM

I broke my yum by installing Python 2.7 on CentOS
 
Hello,

I installed Python 2.7 and replaced the older version of Python without thinking. It has broken my Yum and Yum is not working anymore. I googled and looks like I shouldnt have done that.

I followed the instructions on this page and installed the rpms for Python 2.4.3 again but that also doesn't seem to help.

Please let me know how can I make Yum work again?

Right now this is what I am getting:

----------------------------------------------------------------------
[root@83 bin]# python
Python 2.7.3 (default, Jan 30 2013, 14:31:34)
[GCC 4.1.2 20080704 (Red Hat 4.1.2-54)] on linux2
Type "help", "copyright", "credits" or "license" for more information.

[root@83 bin]# yum
There was a problem importing one of the Python modules
required to run yum. The error leading to this problem was:

No module named rpm

Please install a package which provides this module, or
verify that the module is installed correctly.

It's possible that the above module doesn't match the
current version of Python, which is:
2.4.3 (#1, Jan 9 2013, 06:47:03)
[GCC 4.1.2 20080704 (Red Hat 4.1.2-54)]

If you cannot solve this problem yourself, please go to
the yum faq at:
http://wiki.linux.duke.edu/YumFaq
-----------------------------------------------------------------------

Thanks,
Pradeep

John VV 02-01-2013 05:59 AM

search this site
i have posted a way to fix it at least 5+ times and others have too

the search results
http://www.google.com/search?num=30&...hp.1wkhxqUYQE4


what version of centOS ???
the only two supported are centos 5.9 and centos 6.3
and just prior to this was the system up to date ?

jhaprade 02-02-2013 02:53 AM

It is CentOS release 5.4 (final). I dont know if the system was up to date. I needed a newer version of Python for another software and ending up breaking Yum. I did google and thats why I ended up installing the rpms of Python 2.4.3. But that didnt help.

John VV 02-02-2013 05:02 AM

Quote:

It is CentOS release 5.4 (final).
in that case it is NOT up to date

the current and only supported version in the older 5 series is CentOS 5.9

centos 5.4 went End of Life on "2010-05-14"
About 2.75 years ago

you need to manually install the very last update for python from 3 years ago

however the old 5.4 software repo was moved to the historical archives " the vault"

from the README place holder in the 5.4 mirror
http://centos.arcticnetwork.ca/5.4/
Quote:

This directory (and version of CentOS) is depreciated. For normal users,
you should use /5/ and not /5.4/ in your path. Please see this FAQ
concerning the CentOS release scheme:

http://www.centos.org/modules/smartfaq/faq.php?faqid=34

If you know what you are doing, and absolutely want to remain at the 5.4
level, go to http://vault.centos.org/ for packages. Please keep in mind that 5.4 no longer gets any updates
-- for 64 bit OS --
http://vault.centos.org/5.4/os/x86_64/CentOS/
"python-2.4.3-27.el5.x86_64.rpm"
32 bit
http://vault.centos.org/5.4/os/i386/CentOS/
"python-2.4.3-27.el5.i386.rpm"


the version of python in the base repo MUST 100% MUST be used
if a different version replaces it then yum and a lot of gnome will not work

now you can install a newer version " side by side" , you just can not replace the default version


All times are GMT -5. The time now is 05:34 PM.