No module named yum – python升级导致yum命令无法使用

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.3 (default, Feb 13 2013, 19:20:25)
[GCC 4.4.6 20120305 (Red Hat 4.4.6-4)]

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

系统版本 centos6.3
自带python为2.6
指定yum的python版本即可
vi /usr/bin/yum
#!/usr/bin/python2.6

  1. 暂无评论

  1. 暂无 Trackback

return top