侧边栏壁纸
  • 累计撰写 2,058 篇文章
  • 累计创建 73 个标签
  • 累计收到 20 条评论

目 录CONTENT

文章目录

CentOS yum install 报错No such file or directory

大猿本猿
2023-08-30 / 294 阅读 / 123 字

错误描述

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]#

CentOS yum install 报错No such file or directory