以前用的是python2.5,前又装了个2.6(我其实对版本特性不了解,只是怀疑拿到的一段代码中的某个东东是2.6里有而2.5里没有,瞎折腾。。。),之后yum就出问题了。。运行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.6.2 (r262:71600, Sep 22 2009, 03:42:24)
[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:
折腾了半天,最后的修改方案如下,修改/usr/bin/yum的第一行“#!/usr/bin/python”为"#!/usr/bin/python2.5"。。(/usr/bin/python2.5为我在升级之前备份的python 2.5的执行文件),最后搞定。
阅读(1318) | 评论(0) | 转发(0) |