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

Today I had to run a script on a 64Bit server, but was met with the following error:

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

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

The /lib/ld-linux.so.2: bad ELF interpreter: No such file or directory error will happen only on 64 bit systems, the cause is the that 32 bit libraries are missing from the system and the script/program needs them, so it can’t run.

How to fix the /lib/ld-linux.so.2: bad ELF interpreter: No such file or directory error


The fix is really simple, you can fix it by just installing the missing libraries using the following commands based on your OS:
On any RPM based distribution (CentOS/RedHat/Fedora/Suse/Mandriva):

yum install glibc.i686

On any DEB based distribution (Debian/Ubuntu/Mint/Crunchbang):

apt-get update
apt-get install ia32-libs

That’s it. Now run your script again and it should work.

1 thought on “Fixing /lib/ld-linux.so.2: bad ELF interpreter: No such file or directory

Leave a Reply

Your email address will not be published.