简体   繁体   English

-bash: /usr/bin/yum: /usr/bin/python: bad interpreter: 没有那个文件或目录

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

root@host [~]# yum root@host [~]# yum

-bash: /usr/bin/yum: /usr/bin/python: bad interpreter: No such file or directory -bash: /usr/bin/yum: /usr/bin/python: bad interpreter: 没有那个文件或目录

None- Actually, I deleted old python2.6 directory and install new python2.7 in linux redhat 4.4.7 OS.无 - 实际上,我删除了旧的 python2.6 目录并在 linux redhat 4.4.7 OS 中安装了新的 python2.7。

Don't modify the system python;不要修改系统python; too many things rely on it (like your package manager!).太多东西依赖它(比如你的包管理器!)。 If you want to install a different version of Python, install it somewhere else ( /usr/local , your home directory, etc).如果您想安装不同版本的 Python,请将其安装在其他位置( /usr/local 、您的主目录等)。

If you actually deleted the python2.6 directory (eg, /usr/lib/python2.6 ), you haven't just deleted python 2.6 -- you have deleted any additional python modules that were installed on your system, potentially breaking all sorts of things.如果您实际上删除了python2.6目录(例如, /usr/lib/python2.6 ),那么您不仅删除了 python 2.6 -- 您还删除了系统上安装的任何其他 python 模块,这可能会破坏所有类型的东西。 There's not really a good way to recover from this situation.从这种情况中恢复过来并不是什么好方法。

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.如果您要从另一个系统恢复/usr/lib/python2.6目录,您至少可以再次运行yum ,尽管您的系统仍然会从根本上损坏。 Your best bet is to reinstall from scratch.最好的办法是从头开始重新安装。

If you only deleted the python2.6 binary and left the library directory intact, you could simply restore /usr/bin/python2.6 and things would be relatively back to normal.如果你只删除python2.6二进制文件,并保持库目录完好无损,你可以简单地恢复/usr/bin/python2.6 ,事情会相对恢复正常。

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 -bash: /usr/bin/yum: /usr/bin/python: 错误解释器: 权限被拒绝 - -bash: /usr/bin/yum: /usr/bin/python: bad interpreter: Permission denied Python / usr / bin / env:错误的解释器:不是目录 - Python /usr/bin/env: bad interpreter: Not a directory /usr/bin/bash: 没有这样的文件或目录 - /usr/bin/bash: No such file or directory /usr/bin/ruby2.3:错误的解释器:没有这样的文件或目录 - /usr/bin/ruby2.3: bad interpreter: No such file or directory 运行 pipenv, mkdocs 时出错:/usr/local/opt/python/bin/python2.7: bad interpreter: No such file or directory - Error running pipenv, mkdocs : /usr/local/opt/python/bin/python2.7: bad interpreter: No such file or directory / usr / local / bin / python3:错误的解释器:ubuntu 14.04没有这样的文件或目录 - /usr/local/bin/python3: bad interpreter: No such file or directory for ubuntu 14.04 my_script抛出bash错误:/ home / usr / bin / my_sript:bin / bash /错误的解释器:没有这样的文件或目录。 我该如何纠正该错误? - my_script throwing an error of bash: /home/usr/bin/my_sript: bin/bash/ bad interpreter: No such file or directory. How can I correct this error? Python cron作业:/ usr / local / bin:错误的解释器:权限被拒绝 - Python cron job: /usr/local/bin: bad interpreter: Permission denied /usr/bin/perl: 错误的解释器:文本文件忙 - /usr/bin/perl: bad interpreter: Text file busy “ /usr/bin/javac:/lib/ld-linux.so.2:错误的ELF解释器:没有这样的文件或目录” - “/usr/bin/javac: /lib/ld-linux.so.2: bad ELF interpreter: No such file or directory”
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM