Yum fails with import error "cannot import name urandom"
Issue
- Yum commands fail with traceback error:
[root@unused~]# yum repolist
There was a problem importing one of the Python modules
required to run yum. The error leading to this problem was:
cannot import name urandom
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.4.3 (#1, Dec 22 2011, 12:12:01)
[GCC 4.1.2 20080704 (Red Hat 4.1.2-50)]
If you cannot solve this problem yourself, please go to
the yum faq at:
http://wiki.linux.duke.edu/YumFaq
Environment
- Red Hat Enterprise Linux 5
Subscriber exclusive content
A Red Hat subscription provides unlimited access to our knowledgebase of over 48,000 articles and solutions.
Welcome! Check out the Getting Started with Red Hat page for quick tours and guides for common tasks.
