I compiled a 32-bit executable for a Linux machine. It runs on most Linux distros without trouble. However, on Ubuntu 16.04 LTS, I get the No such file or directory
error when trying to execute it. The executable is present in the directory and has all the relevant permissions set.
There are a few answers detailing a solution to this (like here). So, I did:
dpkg --print-architecture
printsamd64
.dpkg --print-foreign-architectures
printsi386
. Even with multi-arch enabled by default, I am unable to get the executable to work.
What else do I need to install/do in order to get this executable to work?
P.S: The system does not have ia32-libs installed.
ldd /path/to/your/32-bit/binary
? your ubuntu 16.04 system is probably missing the 32-bit libraries that your program needs. BTW, ia32-libs is obsolete, long replaced by multi-arch and simply installing the 32-bit versions of the libraries alongside the 64-bit version (e.g.apt-get install libc6:i386
) – cas May 11 '16 at 05:42.deb
package while you're at it. – cas May 11 '16 at 05:46ldd pathToBinary
returns "not a dynamic executable". I could compile it against a 64-bit install too, but then it would require a lot more testing etc. and timelines are already very short. A multi-arch .deb package for a single executable? I might need to investigate that.. – Sriram May 11 '16 at 13:08file pathToBinary
say? – Stephen Kitt May 11 '16 at 18:32