这个问题在这里已经有了答案:
-bash: /usr/bin/yum: /usr/bin/python: bad interpreter: No such file or directory
(1 个回答)
2年前关闭。
我正在使用 Bluehost 云服务器,它有 CentOs 6.10 (linux 2.6.32-754.14.2.e16.x86_64)
, 我正在尝试安装 python 3.7
,但不知何故删除了centOS中默认的python2.6(从lib,lib64,bin ....中删除)。
现在当我尝试使用 yum 时,它给出了一个错误:
-bash: /usr/bin/yum: /usr/bin/python: bad interpreter: No such file or directory
我应该怎么做才能重新安装 python 2.6,这样 yum 才能工作?
目前 python 3.7.1 正在运行(
/root/python/Python-3.7.1/python
),但我无法安装 pip 或任何其他 python 包,如 numpy。任何帮助将非常感激。
提前致谢。
最佳答案
来自 -bash: /usr/bin/yum: /usr/bin/python: bad interpreter: No such file or directory
If you were to restore the /usr/lib/python2.6 directory from another system you would at least be able to run yum again, although your system would still be fundamentally broken. Your best bet is to reinstall from scratch
关于python - 删除默认 Python 2.7 后在 CentOS 上重新安装 Python,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/57427393/