Ubuntu – I downloaded Dwarf Fortress. Why won’t it run

dependenciesgamespackage-managementsdl

I downloaded the version of Dwarf Fortress for Linux onto my computer, but when I click on the df file, it doesn't do anything. When I run it in a terminal, it gives me this message:

error while loading shared libraries: libSDL_ttf-2.0.so.0: cannot open shared object file: No such file or directory

Best Answer

The Dwarf Fortress archive you downloaded features no dependency resolution, and that error indicates you haven't installed the necessary libraries to play.

Open a terminal and enter the following:

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

That should allow Dwarf Fortress to run correctly unless you are on a 64-bit installation. On 64-bit installations, you may need to add ":i386" as seen here:

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

You may also run into problems with sound. If so, you can follow the directions on the dwarf fortress wiki, which suggest the following:

$ cd df_linux/libs
$ ln -s /usr/lib/i386-linux-gnu/libopenal.so.1 ./libopenal.so
$ ln -s /usr/lib/i386-linux-gnu/libsndfile.so.1 ./libsndfile.so