DEV Community

Paul Walker
Paul Walker

Posted on • Originally published at solarwinter.net on

X doesn't exist

When Linux keeps reporting that a binary doesn't exist, when it clearly does? That's annoying. One possible reason is below - this is the one that bit me a few days ago.

If you don't know what bits and bytes are, skip straight to the end...

32-bit vs 64-bit

For people who know a bit but not the history.

For a long time, all the mainstream computers used 32-bit CPUs. Then things shifted to 64-bit, though it took a while. There was a definite period where things might work or might explode in pieces - and that included the operating system.

In order to be able to sell these to the mass market (see Itanium for a counter example) these CPUs were also capable of running the older 32-bit instructions.

However - 64-bit binaries are not 32-bit binaries. So to be able to run the 32-bit binaries, any dependencies must also be available in 32-bit.

(This is why Windows has two lots of "Program Files", amongst other things.)

Missing dependencies

If the dependencies aren't there then it's handled in different ways by different systems.

Rather confusingly, if a dependency isn't there for a 32-bit Linux binary, then Linux will return "file not found".

On Debian/Ubuntu, the basic runtime library will probably help with fixing a lot of things. You can install that by installing the libc6-i386 package - for example:

apt install libc6-i386

Hope that helps someone!

Latest comments (0)