others-how to solve bad ELF interpreter error

Problem

When we do some operations on Linux operating System, sometimes, we get this error:

/lib/ld-linux.so.2: bad ELF interpreter: No such file or directory

Environment

[x@localhost]$ uname -m&&uname -r
x86_64
2.6.32-220.el6.x86_64
[x@localhost]$ cat /etc/redhat-release
CentOS release 6.2 (Final)

Solution #1

This error is caused by installing 32x app into 64x system. You can install this to avoid this error:

yum install glibc.i686

glibc is the libc library released by GNU, that is, the c runtime library. glibc is the lowest api in the linux system, and almost any other runtime library will depend on glibc. In addition to encapsulating the system services provided by the Linux operating system, glibc itself also provides the realization of many other necessary functional services. Since glibc covers almost all the common UNIX standards, it can be imagined that its content is all-encompassing. And just like other UNIX systems, its contained file groups are scattered in the system’s tree-like directory structure, supporting the entire operating system like a bracket.

If you still get error after installing glibc.i686:

error while loading shared libraries: libstdc++.so.6: cannot open shared object file: No such file or directory

You can install this:

yum install libstdc++.so.6

If you get this error:

error while loading shared libraries: libz.so.1: cannot open shared object file: No such file or directory

You can do this:

yum install zlib.i686 --setopt=protected_multilib=false <!--setpot to avoid conflicts-->

Solution #2

If you don’t want to install the dependencies one by one, you can install all the dependencies of 32x apps in 64x system by executing this command:

yum install libstdc++.i686
yum install xulrunner.i686

Ok, everything is done.