On centos, yum is a very useful and powerful tool. After some software upgrades in the system, especially after python upgrades, yum is unavailable.
This error message appears.
[Html]
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
Current version of Python, which is:
2.7.2 (default, Nov 8 2012, 23:03:00)
[GCC 4.1.2 20080704 (Red Hat 4.1.2-48)]
If you cannot solve this problem yourself, please go
The yum faq:
Http://wiki.linux.duke.edu/YumFaq
The error message is that the python version does not match. Modify the default python version of the yum tool.
[Html]
Vi/usr/bin/yum
Open the script file
[Html]
#! /Usr/bin/python
Import sys
Try:
Import yum
.......
Change
[Html]
#! /Usr/bin/python2.4
Import sys
Try: www.2cto.com
Import yum
Failed t ImportError:
Because python is upgraded or installed, you can specify a new version.