错误描述
centos7实用yum install 报错:No such file or directory
[root@centos7 ~]# yum
-bash: /usr/bin/yum: /usr/bin/python: bad interpreter: No such file or directory
错误分析
yum
找不到/usr/bin/python
,centOS应该实用python2,服务器默认的Python版本已经改为python3了。
解决方法
做python命令的重定向即可。
[root@centos7 ~]# cd /usr/bin
[root@centos7 bin]# ln -s python2 python
[root@centos7 bin]# ls -l python
lrwxrwxrwx. 1 root root 7 Jul 9 11:10 python -> python2
[root@centos7 bin]#