How do I install the library libSDL_image-1.2.so.0 required to run Dwarf Fortress?

It seems the game can't find some SDL libraries. Using apt-file the package I get (on 12.10) that provides that libraries is libsdl-image1.2:

➜  apt-file search  libSDL_image-1.2.so.0
libsdl-image1.2: /usr/lib/x86_64-linux-gnu/libSDL_image-1.2.so.0
libsdl-image1.2: /usr/lib/x86_64-linux-gnu/libSDL_image-1.2.so.0.8.4

So you should first verify that package is really installed. If it is then either the program needs the 32bit version or it indeed needs the 64bit version but can't find it.

To install the 32 bit version:

sudo apt-get install libsdl-image1.2:i386

If this still doesn't solve the problem you can try to run the game using LD_DEBUG=libs ./df. This will output a lot of info that could help to detect why it can't find that lib. Also, take a look at the README.linux file in Dwarf Fortress folder and check if all the requirements are satisfied.


On my Ubuntu bits, I had 3 packages to install in 32bits for DwarfFortress :

sudo apt-get install libsdl-image1.2:i386
sudo apt-get install libgtk2.0-0:i386
sudo apt-get install libsdl-ttf2.0-0:i386

In addition to the three above, at least on ubuntu 14.04, you need this one:

sudo apt-get install libglu1-mesa:i386

None of the existing worked for me on Ubuntu 16.04, but this did:

sudo apt-get install libsdl1.2debian libsdl-image1.2 libsdl-ttf2.0-0

Source


I also needed this on a 16.04 box:

sudo apt-get install libglu1-mesa

So, all together:

sudo dpkg --add-architecture i386
sudo apt-get update

sudo apt-get install libsdl-image1.2:i386 \
                     libsdl-ttf2.0-0:i386 \
                     libgtk2.0-0:i386 \
                     libglu1-mesa:i386 \
                     openssl:i386

sudo apt-get install libsdl1.2debian

sudo apt-get install libsdl1.2debian \
                     libsdl-image1.2 \
                     libsdl-ttf2.0-0

sudo apt-get install libglu1-mesa