LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 11-16-2012, 04:20 AM   #1
cluelessGoogler
LQ Newbie
 
Registered: Nov 2012
Posts: 4

Rep: Reputation: Disabled
Fixing yum


I've upgraded my python to 2.7 and yum broke. Typical problem and there are some solutions out there on how to make yum work and have python 2.7 too.
Problem I am having is that I can't even repair yum. I don't use python 2.7 that often, so even if I constantly have to switch the symbolic link for python from "yum python" to 2.7 python when I need it, I'd be ok with that.

I've since tried installing python 2.4(2 subversions), 2.6(2 different subversions one of which is supposed to be default for Centos 6.2 which is what I am using) and 2.7. Nothing works. This is what my usr/loca/bin looks like at this point.
2to3 idle python python2.6-config python-config
coraenv oraenv python2.4 python2.7 smtpd.py
dbhome pydoc python2.6 python2.7-config sqldevelope

Any yum command simply returns:
--------------------------------------------------------------
There was a problem importing one of the Python modules
required to run yum. The error leading to this problem was:

No module named yum

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.6.6 (r266:84292, Nov 14 2012, 16:27:16) <-------OR whatever 2.x.y that I happen to be trying.
[GCC 4.4.6 20110731 (Red Hat 4.4.6-3)]

If you cannot solve this problem yourself, please go to
the yum faq at:
http://yum.baseurl.org/wiki/Faq
--------------------------------------------------------------
Is there a way to repair yum at this point? Thanks in advance guys.

Last edited by cluelessGoogler; 11-16-2012 at 04:21 AM.
 
Old 11-16-2012, 12:45 PM   #2
teckk
Senior Member
 
Registered: Oct 2004
Distribution: FreeBSD Arch
Posts: 1,841

Rep: Reputation: 225Reputation: 225Reputation: 225
If you need to reinstall yum, search for how to install yum without yum.

http://forum.parallels.com/showthread.php?t=209661
http://wiki.centos.org/TipsAndTricks/BrokenVserver
http://www.linuxquestions.org/questi...archid=5583681
 
Old 11-17-2012, 12:44 AM   #3
John VV
LQ Muse
 
Registered: Aug 2005
Location: A2 area Mi.
Posts: 16,986

Rep: Reputation: 2447Reputation: 2447Reputation: 2447Reputation: 2447Reputation: 2447Reputation: 2447Reputation: 2447Reputation: 2447Reputation: 2447Reputation: 2447Reputation: 2447
yum yes bold and cap MUST HAVE THE EXACT VERSION in the software repo !!!
now you can install a second or third version BUT DO NOT replace the old version !!!
say as /usr/lib/python27

seeing as you already did that - you have a problem a BIG problem

you WILL have to manually download from your distros base or update repo the correct version
for 6.2 ??? you do know that that version is NOT supported any longer
so you have only one repo you can use
the "historical VAULT" and install the very LAST one for 6.2
http://mirrors.arsc.edu/centos/
the 6.2 repo is dead so
-- the VAULT --
http://vault.centos.org/
--- 32 bit ---
http://vault.centos.org/6.2/updates/i386/Packages/
and the last python for 6.2
python-2.6.6-29.el6_2.2.i686.rpm


download it and force a rpm install
Code:
su -
cd to/the/location/you/saved/theRPM 

rpm -i --force python-2.6.6-29.el6_2.2.i686.rpm
be VERY careful when forcing a rpm
make 100% sure it is the right one

Quote:
Problem I am having is that I can't even repair yum. I don't use python 2.7 that often, so even if I constantly have to switch the symbolic link for python from "yum python" to 2.7 python
do not do that

explicitly call the version of python you need in building code or in config files
i have 3 versions installed
the system default (1)
a newer version in the current Blender ( 3d program) ( 2)
a very very old version in a very old version of Blended- for compatibility reasons i need it) ( 3)

Last edited by John VV; 11-17-2012 at 12:53 AM.
 
  


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 install flash ... yum: command not found ... which yum ... /usr/bin/yum tg3793 Fedora 8 04-13-2011 12:25 PM
how to update rhel 5 using centos yum updater without conflict with yum redhat plugin udayvikram Linux - Software 2 03-30-2010 09:15 AM
how to update rhel 5 using centos yum updater without conflict with yum redhat plugin udayvikram Linux - Newbie 1 03-29-2010 01:56 PM
problem after yum yum yum (delicious) alaios Fedora 3 01-14-2009 03:34 AM
yum config error parsing file failed - yum won't run emuub Linux - Software 9 11-04-2008 06:48 AM


All times are GMT -5. The time now is 06:34 AM.

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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration