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 01-16-2017, 03:36 PM   #1
artsunixclones
LQ Newbie
 
Registered: Jan 2017
Posts: 3

Rep: Reputation: Disabled
Updated PYTHON and YUM is now broken


InfoSys:
Linux oraclelinux6 2.6.32-431.5.1.el6.x86_64 #1 SMP Tue Feb 11 11:09:04 PST 2014 x86_64 x86_64 x86_64 GNU/Linux

[me@oraclelinux6 usr]# python --version
Python 2.7.11


-------------------------------------------------------
[root@oraclelinux6 usr]# 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 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.7.11 (default, Nov 4 2016, 01:12:28)
[GCC 5.3.0]

If you cannot solve this problem yourself, please go to
the yum faq at:
http://yum.baseurl.org/wiki/Faq
 
Old 01-16-2017, 03:41 PM   #2
rtmistler
Moderator
 
Registered: Mar 2011
Location: USA
Distribution: MINT Debian, Angstrom, SUSE, Ubuntu, Debian
Posts: 8,444
Blog Entries: 13

Rep: Reputation: 3762Reputation: 3762Reputation: 3762Reputation: 3762Reputation: 3762Reputation: 3762Reputation: 3762Reputation: 3762Reputation: 3762Reputation: 3762Reputation: 3762
Have you gone to the wiki faq link provided by the error report?
 
1 members found this post helpful.
Old 01-16-2017, 04:11 PM   #3
artsunixclones
LQ Newbie
 
Registered: Jan 2017
Posts: 3

Original Poster
Rep: Reputation: Disabled
Linkage Problem and Solution: The version of Python was 2.7 and needed 2.6 so I unlink the package binary file and now works perfectly. - Thank You

Python 2.7.13 (default, Jan 5 2017, 12:39:11)

No module named yum
Used the following command to check my Python's version causing the problem. - art.s 01/16/2017

-bash-4.1$ python -v (TRUSS-LIKE)

Step1:
-bash-4.1$ ls -l /usr/bin/python
lrwxrwxrwx. 1 root root 22 Jan 16 14:47 /usr/bin/python -> /opt/splunk/bin/python

Step2:
-bash-4.1$ sudo unlink /usr/bin/python

Step3:
-bash-4.1$ sudo ln -s /usr/bin/python2.6 /usr/bin/python

Step4: Old version binary file was relinked
-bash-4.1$ python --version
Python 2.6.6

Step5:
-bash-4.1$ yum
Loaded plugins: refresh-packagekit, security, ulninfo
You need to give some command
Usage: yum [options] COMMAND
 
Old 01-16-2017, 04:35 PM   #4
John VV
LQ Muse
 
Registered: Aug 2005
Location: A2 area Mi.
Posts: 17,465

Rep: Reputation: 2606Reputation: 2606Reputation: 2606Reputation: 2606Reputation: 2606Reputation: 2606Reputation: 2606Reputation: 2606Reputation: 2606Reputation: 2606Reputation: 2606
yum is built on the system DEFAULT python
Warning:
YOU CAN NOT REPLACE THAT VERSION!!!


now you can install a second,third,or fourth version in a side by side set up
the DEFAULT set up for python in the rhel/cent/sl/oracle repos
 
Old 01-16-2017, 07:16 PM   #5
artsunixclones
LQ Newbie
 
Registered: Jan 2017
Posts: 3

Original Poster
Rep: Reputation: Disabled
Python version returned to its original installation state

Quote:
Originally Posted by rtmistler View Post
Have you gone to the wiki faq link provided by the error report?
Quote:
Originally Posted by John VV View Post
yum is built on the system DEFAULT python
Warning:
YOU CAN NOT REPLACE THAT VERSION!!!


now you can install a second,third,or fourth version in a side by side set up
the DEFAULT set up for python in the rhel/cent/sl/oracle repos

You're correct - But the version is back to its original state now 2.6
 
  


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 broken when updating python -Scientific Linux Lidilis Linux - Software 3 03-26-2015 05:52 AM
centos broken yum after installing new python mad_penguin Linux - Newbie 2 11-17-2011 06:36 PM
Broken YUM and Possibly Python nikunjbadjatya Linux - Software 3 06-17-2010 01:55 AM
Yum broken Incorrect python version FC6 zeromaster Fedora 7 11-24-2007 09:54 AM
FC2 yum updated to 2.1.11 need new yum.conf? peregrine2 Linux - Newbie 1 12-02-2004 08:14 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 03:28 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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration