0
votes

I have Red Hat Linux (Red Hat Enterprise Linux Server release 6.5 (Santiago) ) and yum in not working with message 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.8 (default, Nov  7 2014, 11:45:08) 
[GCC 4.4.7 20120313 (Red Hat 4.4.7-11)]

If you cannot solve this problem yourself, please go to 
the yum faq at:
  http://yum.baseurl.org/wiki/Faq

Current version of python is 2.7.8

Any help is appreciated.

1

1 Answers

1
votes

CentOS 6 ships with python 2.6. Someone installed an incompatible version of python system-wide and that has broken things. That should not have been done.

You need to find out how the 2.7 version of python was installed and fix that (by removing the incorrect package or by removing the source-installed python or by fixing the $PATH or whatever else is appropriate).

To help figure out what the problem is exactly we need the output from the following commands (as a start).

What does rpm -qa python\* say?

What does which -a python say?