-bash: /usr/bin/yum: /usr/bin/python22: bad interpreter: No such file or directory
[root@localhost ~]# whereis python
python: /usr/bin/python2.6-config /usr/bin/python /usr/bin/python2.6 /usr/lib/python2.6 /usr/lib64/python2.6 /usr/include/python2.6 /usr/share/man/man1/python.1.gz
[root@localhost ~]# whereis yum
yum: /usr/bin/yum /etc/yum /etc/yum.conf /usr/share/man/man8/yum.8.gz
--修改
#vi /usr/bin/yum
将首行的#!/usr/bin/python
更改成 #!/usr/bin/python2.6
保存退出!
解决!
这个错误是因为python的版本不匹配,只要在/usr/bin/yum中把第一行的#!/usr/bin/python改成#!/usr/bin/python2.6(系统中默认的版本)就可以啦~当然,我是指路径对的情况下.
[root@localhost ~]# yum install -y wget && wget -O install.sh http://download.bt.cn/install/install.sh && sh install.sh
-bash: /usr/bin/yum: /usr/bin/python22: bad interpreter: No such file or directory
评论列表