-bash:/usr/bin/yum:/usr/bin/python:错误的解释器:没有这样的文件或目录 [英] -bash: /usr/bin/yum: /usr/bin/python: bad interpreter: No such file or directory

查看:4222
本文介绍了-bash:/usr/bin/yum:/usr/bin/python:错误的解释器:没有这样的文件或目录的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

root @ host [〜]# yum

root@host [~]# yum

-bash:/usr/bin/yum:/usr/bin/python:错误的解释器:没有这样的文件或目录

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

无-实际上,我删除了旧的python2.6目录,并在linux redhat 4.4.7 OS中安装了新的python2.7.

推荐答案

请勿修改系统python;太多的东西依赖它(例如您的包管理器!).如果要安装其他版本的Python,请将其安装在其他位置(/usr/local,主目录等).

Don't modify the system 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).

如果您实际上删除了python2.6 directorY (例如,/usr/lib/python2.6),则说明您不仅删除了python 2.6,还删除了任何其他python模块 >已安装在您的系统上,可能会破坏各种各样的东西.从这种情况中恢复真的不是一个好方法.

If you actually deleted the python2.6 directorY (e.g., /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. There's not really a good way to recover from this situation.

如果要从另一个系统还原/usr/lib/python2.6目录,则至少可以再次运行yum,尽管您的系统仍然会从根本上被破坏.最好的选择是从头开始重新安装.

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.

如果仅删除python2.6 binary 并保留库目录不变,则只需恢复/usr/bin/python2.6,事情就会相对恢复正常.

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.

这篇关于-bash:/usr/bin/yum:/usr/bin/python:错误的解释器:没有这样的文件或目录的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆