-bash: /usr/bin/yum: /usr/bin/python: bad interpreter: No such file or directory

造成的原因是之前对python进行了一个备份,当python出现多版本也会出现这个情况

[root@localhost bin]# yum
-bash: /usr/bin/yum: /usr/bin/python: bad interpreter: No such file or directory
[root@localhost bin]# whereis python
python: /usr/bin/python2.6 /usr/bin/python.bak /usr/lib/python2.6 /usr/lib64/python2.6 /usr/include/python2.6 /usr/share/man/man1/python.1.gz
[root@localhost bin]# whereis yum
yum: /usr/bin/yum /etc/yum /etc/yum.conf /usr/share/man/man8/yum.8.gz
[root@localhost bin]# mv python.bak python
[root@localhost bin]# whereis python
python: /usr/bin/python2.6 /usr/bin/python /usr/lib/python2.6 /usr/lib64/python2.6 /usr/include/python2.6 /usr/share/man/man1/python.1.gz
[root@localhost bin]# yum
Loaded plugins: fastestmirror, refresh-packagekit, security
You need to give some command
Usage: yum [options] COMMAND

List of Commands:

check          Check for problems in the rpmdb
check-update   Check for available package updates
clean          Remove cached data
deplist        List a package's dependencies
distribution-synchronization Synchronize installed packages to the latest available versions
downgrade      downgrade a package
erase          Remove a package or packages from your system

 

posted @ 2019-12-04 17:23  天宇轩-王  阅读(4977)  评论(0)    收藏  举报