Loading 32-bit libraries on 64-bit Ubuntu


OK so I tried to run simutrans on my new 64-bit Ubuntu box... and got this:



./sim99-18-1671: error while loading shared libraries: libSDL-1.2.so.0: cannot open shared object file: No such file or directory

If you look at which libraries are actually being loaded, this way:


ldd ./sim99-18-1671

linux-gate.so.1 => (0xffffe000) libz.so.1 => /usr/lib32/libz.so.1 (0xf7fac000) libSDL-1.2.so.0 => not found libpthread.so.0 => /lib32/libpthread.so.0 (0xf7f93000) libSDL_mixer-1.2.so.0 => not found libstdc++.so.6 => not found libm.so.6 => /lib32/libm.so.6 (0xf7f6e000) libgcc_s.so.1 => /usr/lib32/libgcc_s.so.1 (0xf7f63000) libc.so.6 => /lib32/libc.so.6 (0xf7e13000) /lib/ld-linux.so.2 (0xf7fd1000)

...you'll see that several libraries aren't found, and that the other libraries that are found are 32-bit (in /lib32)... not the system standard 64-bit (in /lib).

To overcome this, we'll have to:



sudo apt-get install apt-file * $ sudo apt-file update $ sudo apt-file --architecture i386 search libSDL-1.2.so.0 ia32-libs: /usr/lib32/libSDL-1.2.so.0 [...more listing here...] $ sudo apt-get install ia32-libs *

and likewise for any other missing 32-bit libraries.