Monday, May 25, 2020

bash: ./mono: No such file or directory

If you are ever trying to run a mono binary program (such as from GOG) on a 64-bit Ubuntu and get the error:
bash: ./mono: No such file or directory
the cause might be that you are missing the 32 bit libraries.
$ ls -l mono
-rwxr-xr-x 1 bill bill 3025284 May 22 13:58 mono
$ ./mono
bash: ./mono: No such file or directory
$ strace ./mono
execve("./mono", ["./mono"], 0x7ffefde5caa0 /* 21 vars */) = -1 ENOENT (No such file or directory)
fstat(2, {st_mode=S_IFCHR|0620, st_rdev=makedev(136, 1), ...}) = 0
write(2, "strace: exec: No such file or di"..., 40strace: exec: No such file or directory
) = 40
getpid() = 28163
exit_group(1) = ?
+++ exited with 1 +++

On Ubuntu 18 this was solved with (but I am guessing that libc6 was the only install required to at least get a better error message):
sudo apt-get install libc6:i386 libasound2:i386 libasound2-data:i386 libasound2-plugins:i386 libcaca0:i386 libjpeg-turbo8:i386 libtiff5:i386 libncurses5:i386 libsqlite3-0:i386 libsdl1.2debian:i386 libsdl-mixer1.2:i386 libsdl-image1.2:i386 libgdiplus:i386