Yum commands fail with error "No module named yum"

Solution Verified - Updated -

Issue

  • yum command fails with following message,
[root@system]# yum repolist
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

Or:

yum update

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.5 (default, Jul 29 2013, 15:43:13)
[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:

Environment

  • Red Hat Enterprise Linux 5
  • Red Hat Enterprise Linux 6

Subscriber exclusive content

A Red Hat subscription provides unlimited access to our knowledgebase of over 48,000 articles and solutions.

Current Customers and Partners

Log in for full access

Log In