将centos升级,python也跟着升级到2.6版本,
然后尝试使用yum命令提示版本不对,于是使用vi/usr/bin/yum修改首行
将#!/usr/bin/python 改为#!/usr/bin/python2.6
接着重启服务器,
然后再使用yum命令出现以下错误
**/usr/bin/yum: line 3: import: command not found
/usr/bin/yum: line 4: try:: command not found
/usr/bin/yum: line 5: import: command not found
/usr/bin/yum: line 6: except: command not found
/usr/bin/yum: line 24: syntax error near unexpected token `(‘
/usr/bin/yum: line 24: `””” % (sys.exc_value, sys.version)’**
求解