-bash: /bin/ansible: /usr/bin/python2: bad interpreter: No such file or directory
时间: 2023-08-08 22:07:52 浏览: 132
Linux执行可执行文件提示No such file or directory的解决方法
根据引用\[1\]和引用\[2\]的信息,你遇到的问题是在使用yum安装软件时报错,提示找不到python2.4或python3的解释器。根据引用\[3\]的信息,你可以使用whereis命令来查找python和yum的位置。根据引用\[3\]的结果,你可以看到python的位置是/usr/bin/python,而yum的位置是/usr/bin/yum。根据引用\[3\]的修改方法,你可以使用vi编辑器打开/usr/bin/yum文件,并将首行的#!/usr/bin/python更改为#!/usr/bin/python2.4,然后保存退出。这样就可以解决你遇到的问题了。
#### 引用[.reference_title]
- *1* [-bash: /usr/bin/yum: /usr/bin/python2.4: bad interpreter: No such file or directory](https://blog.csdn.net/aaaaaab_/article/details/82055761)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v91^insertT0,239^v3^insert_chatgpt"}} ] [.reference_item]
- *2* [/usr/bin/python3:bad interpreter:No such file or directory](https://blog.csdn.net/weixin_42074867/article/details/119599581)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v91^insertT0,239^v3^insert_chatgpt"}} ] [.reference_item]
- *3* [-bash: /usr/bin/yum: /usr/bin/python: bad interpreter: No such file or directory](https://blog.csdn.net/weixin_30278237/article/details/99228416)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v91^insertT0,239^v3^insert_chatgpt"}} ] [.reference_item]
[ .reference_list ]
阅读全文