LinuxQuestions.org
Visit Jeremy's Blog.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Red Hat
User Name
Password
Red Hat This forum is for the discussion of Red Hat Linux.

Notices


Reply
  Search this Thread
Old 01-31-2013, 03:24 AM   #1
jhaprade
LQ Newbie
 
Registered: Jan 2013
Posts: 3

Rep: Reputation: Disabled
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
 
Old 02-01-2013, 05:59 AM   #2
John VV
LQ Muse
 
Registered: Aug 2005
Location: A2 area Mi.
Posts: 17,623

Rep: Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651
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 ?
 
Old 02-02-2013, 02:53 AM   #3
jhaprade
LQ Newbie
 
Registered: Jan 2013
Posts: 3

Original Poster
Rep: Reputation: Disabled
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.
 
Old 02-02-2013, 05:02 AM   #4
John VV
LQ Muse
 
Registered: Aug 2005
Location: A2 area Mi.
Posts: 17,623

Rep: Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651
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
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Yum corrupted on CentOS 6.2, Problem importing one the python modules. WassimZ Linux - Newbie 13 01-14-2013 01:36 PM
Installing Python 2.7.2 and python-devel on CentOS 5.7 iwitham Linux - Software 1 03-21-2012 05:14 PM
centos broken yum after installing new python mad_penguin Linux - Newbie 2 11-17-2011 05:36 PM
Problems with Python, CentOS and Yum Hamidof Linux - Software 1 04-03-2009 01:22 PM
yum broke after installing python2.3.3 on FC2 powah Linux - Software 3 12-06-2005 06:29 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Red Hat

All times are GMT -5. The time now is 09:21 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration