Misleading Error Message When Running 32bit Applications on 64bit Ubuntu/Linux

Short version (aka, Executive Summary)

If you try to run a 32bit program under 64bit Ubuntu, there is a chance you might see this misleading error message:

-bash: ./executable_filename: No such file or directory

What the shell is actually trying to say is "You can't run 32 bit applications here without installing support for 32 applications!".

Longer version

We purchased the Webyog's MONyog MySQL monitoring tool, after some trial version testing in a Windows environment. When trying to run it on one of our Ubuntu servers, I got this:

myuser@myserver:~/MONyog/bin$ ./MONyog-bin
-bash: ./MONyog-bin: No such file or directory

I checked again: the file was there, permissions were okay. Hmm. Why was bash saying the file wasn't there? Here it is! It's not like the error came from the application, it was bash itself saying that it's not found.
I googled for a while till I opened a support ticket at Webyog, and this is how I found out the real reason. The solution is to install support for 32 bit applications which is package called ia32-libs-sdl (which also installs a number of prerequisites). Once it's installed, the program works.

I'll use this opportunity to praise Webyog's support, which was fast and to the point. I got my initial reply with an explanation after few hours, and the solution the next day - without having to chase them for it.

1 comment:

  1. I guess the real reason for this confusing "No such file or directory" (while, in fact, the executable is readily there) comes from the fact that the kernel will return ENOENT error also when the dynamic linker (e.g. /lib/ld-linux.so.2) is missing. It's curious cause you get a different, more obvious, error message when a regular shared library is missing: this is because the kernel runs the executable just fine and then the dynamic linker complains and terminates the execution. Loading the dynamic linker itself is the responsibility of the kernel, though, and the kernel is not very wordy in its errors.

    This concludes the technical panel.