Ask Your Question
0

Yum problem

asked 2012-11-01 00:58:12 -0500

pedrojosecas gravatar image

When run the yum command appear this problem:

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.7 (r267:88850, Feb 1 2012, 05:55:39) [GCC 4.1.2 20070925 (Red Hat 4.1.2-33)]

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

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
0

answered 2012-11-02 10:07:40 -0500

dmalcolm gravatar image

updated 2012-11-02 10:09:41 -0500

Judging by the error message, it looks like you have a custom build of Python 2.6 in your $PATH. The system copy of yum (/usr/bin/yum) assumes it will be run with the system copy of python /usr/bin/python), and since Fedora 14, the system copy of Python has been Python 2.7

You can run:

which python

to see which version of Python is in the $PATH

As a workaround, you can explicitly invoke yum with the system python like this:

/usr/bin/python /usr/bin/yum

followed by any yum commands, all on one line

edit flag offensive delete link more

Question Tools

Stats

Asked: 2012-11-01 00:58:12 -0500

Seen: 1,002 times

Last updated: Nov 02 '12