python升级造成yum错误问题解决

1.错误提示

 1 [root@ct]# yum install redis 
 2 There was a problem importing one of the Python modules  
 3 required to run yum. The error leading to this problem was:  
 4   
 5   
 6    No module named yum  
 7   
 8   
 9 Please install a package which provides this module, or  
10 verify that the module is installed correctly.  

2.解决方法

 1 vi /usr/bin/yum
 2 
 3 #!/usr/bin/python
 4 #修改
 5 #!/usr/bin/python2.6
 6 
 7 
 8 vi /usr/bin/yum-updatest
 9 
10 #!/usr/bin/python
11 #修改为
12 #!/usr/bin/python2.6

 

posted @ 2017-03-01 12:08  chent  阅读(261)  评论(0编辑  收藏  举报