linux 出现bash: ****: /lib64/ld-linux-x86-64.so.2: bad ELF interpreter: No such file or directory

误删除glibc-2.12-1.192.el6.x86_64 rpm 包,导致整个系统的所有命令(cd 除外)都不能用。

使用命令出现如下提示:

bash: /bin/cp: /lib64/ld-linux-x86-64.so.2: bad ELF interpreter: No such file or directory

bash: /bin/ls: /lib64/ld-linux-x86-64.so.2: bad ELF interpreter: No such file or directory

bash:/usr/bin/yum: /lib64/ld-linux-x86-64.so.2: bad ELF interpreter: No such file or directory

解决办法: 进入救援模式

1,关闭主机电源,

2,打开电源进入blos调整光盘启动(挂载系统镜像)

3,进入救援模式

4,创建一个目录用于挂载镜像文件

mkdir /media 
mount /dev/sr0 /media

5,进入镜像中安装包的目录,安装删掉的glibc 包。

cd /media/Packages

rpm -Uvh –root –force –nodeps /mnt/sysimages glibc-2.12-1.149.el6_6.5.x86_64.rpm

6,重启机器

reboot

7,如果不出什么错误就可以了。(可能会出现一堆* 号的提示)

时间: 2024-08-06 16:01:51

linux 出现bash: ****: /lib64/ld-linux-x86-64.so.2: bad ELF interpreter: No such file or directory的相关文章

CentOS安装软件出现错误:bash: /usr/local/bin/rar: /lib/ld-linux.so.2: bad ELF interpreter: No such file or directory

CentOS安装软件出现错误: bash: /usr/local/bin/rar: /lib/ld-linux.so.2: bad ELF interpreter: No such file or directorygoogle了一把才发现是64位系统中安装了32位程序解决方法:yum install glibc.i686 重新安装以后还有如下类系错误 再继续安装包 error while loading shared libraries: libstdc++.so.6: cannot open

Linux中配置jdk环境变量出错:bad ELF interpreter: No such file or directory解决方法

yum install glibc.i686 重新安装,javac成功 如果还有如下类系错误 再继续安装包 error while loading shared libraries: libstdc++.so.6: cannot open shared object file: No such file or directory yum install libstdc++.so.6 引用链接:https://blog.csdn.net/travel7623/article/details/817

window下编写python脚本在linux下运行出错 usr/bin/python^M: bad interpreter: No such file or directory

今天在windows下使用notepad++写了个python脚本,传到linux服务器执行后提示:-bash: ./logger.py: usr/bin/python^M: bad interpreter: No such file or directory 1.原因分析 这是不同系统编码格式引起的:在windows系统中编辑的logger.py文件可能有不可见字符,所以在Linux系统下执行会报以上异常信息.一般是因为windows行结尾和linux行结尾标识不同造成的,在window中行结

linux:执行脚本出现/bin/sh^M: bad interpreter: No such file or directory

问题出在^M,原因是脚本文件的编码格式是dos,有可能是我在window下编辑完了直接传到linux的结果,可以在vim中输入以下命令确认编码格式 :set ff //可以看到dos或unix的字样. 如果的确是dos格式的, 那么你可以用set ff=unix把它强制为unix格式的, 然后存盘退出. 再运行一遍看. 也可以在命令行中用dos2unix指令转换编码 #dos2unix filename linux:执行脚本出现/bin/sh^M: bad interpreter: No suc

Linux报错第一弹: /bin/sh^M: bad interpreter: No such file or directory

从Windows Sublime 写好一shell脚本,移到 Linux下,发现报错,/bin/sh^M: bad interpreter: No such file or directory 原因:这是不同系统编码格式引起的:在 windows系统中编辑的 .sh文件可能有不可见字符,所以在 Linux系统下执行会报以上异常信息. 解决: 1)在 windows下转换: 利用一些编辑器如 UltraEdit或 EditPlus等工具先将脚本编码转换,再放到 Linux中执行.转换方式如下( U

linux sh脚本异常:/bin/sh^M:bad interpreter: No such file or directory

在Linux中执行.sh脚本,异常/bin/sh^M: bad interpreter: No such file or directory.这是不同系统编码格式引起的:在windows系统中编辑的.sh文件可能有不可见字符,所以在Linux系统下执行会报以上异常信息. 如果我们的脚本是在windows环境下编写的,需要将编码转换称unix格式. 下面我们用Notepad++中Windows,Unix,Mac三种格式之间的转换. 1.我们先查看当前文件格式(换行符用的是什么字符),如图: 2.从

-bash: ./****.py: /usr/bin/python^M: bad interpreter: No such file or directory

在windows系统下写的python脚本,在linux下赋予权限chmod +x xxx.py 以后,执行./xxx.py运行提示:bash: /usr/bin/autocrorder: /usr/bin/python^M: bad interpreter: No such file or directory 更多文章请点击我 分析: 这是不同系统编码格式引起的:在windows系统中编辑的.sh .py文件可能有不可见字符,所以在Linux系统下执行会报以上异常信息.一般是因为windows

/bin/bash^M: 坏的解释器: 没有那个文件或目录(bad interpreter: No such file or directory)

在Linux下编译cocos2d-x运行脚本的时候出现"/bin/bash^M: 坏的解释器: 没有那个文件或目录(bad interpreter: No such file or directory)"这样的错误如下图. 解决方法: 使用在终端输入sed -i 's/\r$//' make-all-linux-project.sh即可 其中make-all-linux-project.sh为我的文件名,这里改成自己需要的即可 原因: 这个文件在Windows 下编辑过,在Window

Shell脚本报错:-bash: ./switch.sh: /bin/bash^M: bad interpreter: No such file or directory

在学习shell中测试case参数命令代码如下 #!/bin/bash #switch测试 case $1 in     start)         echo 'start'     ;;     stop)         echo 'stop'     ;; esac 在给当前shell脚本赋予了执行权限之后,执行报错代码如下 [[email protected] sh]# ./switch.sh stop -bash: ./switch.sh: /bin/bash^M: bad inte