把Centos5上的Python升级到2.6后,用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 packagewhich 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.5 (r265:79063, Jul 22010, 16:30:56)[GCC 4.1.2 20080704(Red Hat 4.1.2-46)]If you cannot solve this problem yourself, please go to the yum faq at: http://wiki.linux.duke.edu/YumFaq
解决方法:
由于yum 默认用的是python2.4,所以编译vim /usr/bin/yum
把#!/usr/bin/python 改为
#!/usr/bin/python2.4 即可