[英]-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.