Python 升级导致 yum 命令无法使用的解决办法


yum -y install prce  
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.1 (r261:67515, Aug 7 2010, 11:36:17)  
[GCC 4.1.2 20080704 (Red Hat 4.1.2-44)]  
If you cannot solve this problem yourself, please go to  
the yum faq at:

执行命令 找到 yum 命令的在哪

whereis yum
yum: /usr/bin/yum /etc/yum /etc/yum.conf /usr/share/man/man8/yum.8.gz


vim /usr/bin/yum
# 改成



cp /usr/bin/python /usr/bin/python2.6.6