> CentOS > CentOS故障 >

yum出现“No module named yum”错误解决方法

安装了一个Python2.7,隔天发现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

------------------------------------------------------------------------------------------------




解决办法
修改yum文件
#vi /usr/bin/yum
将 #!/usr/bin/python 修改为 #!/usr/bin/python2.4
(责任编辑:IT)