I have downloaded Dwarf Fortress, and I believe I've collected all the required files. However, when I click on the df file, it asks me some things, I click on "Run," and nothing happens. The game just does not open at all.

I am running Ubuntu 12.04 with Gnome 3 on 64-bit. If I could get the game to open I am sure I could deal with the other problems that may occur.

I am fairly new to Ubuntu, and I haven't used Linux since 2009.

Most likely there are some files I don't know about.

Running it in terminal:

$ ./df
./libs/Dwarf_Fortress: error while loading shared libraries: libSDL_image-1.2.so.0:
    cannot open shared object file: No such file or directory 
  • The best way to diagnose the problem is running it on a terminal. Instead of choosing "Run" choose "Run in terminal" or open a terminal, use cd to change to the directory where df is and run ./df. Then update your question with the output you get. – Salem Dec 7 '12 at 21:50
  • nex@ExistentialAndroid:~/Downloads/df_linux$ ./df ./libs/Dwarf_Fortress: error while loading shared libraries: libSDL_image-1.2.so.0: cannot open shared object file: No such file or directory nex@ExistentialAndroid:~/Downloads/df_linux$ The only problem is I apparently have libSDL_image-1.2.so.0 installed, at least the Ubuntu Software Center thing tells me it is installed. – Existential Android Dec 8 '12 at 3:07

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.

  • 1
    I did as you suggested, got another error, so I did pretty much the same thing but found out how to install what it asked for, and I found this: libglu1-mesa, but that did not work so I tried ia32-libs. That installed a lot of things, but now DF works. Thanks. – Existential Android Dec 8 '12 at 18:54
  • This answer also worked for Onlink game (which needed the 32bit version) – Kyborek Oct 27 '15 at 20:11

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
  • running DF on ubuntu 16.04 also requires installation of these four. – 7yl4r Dec 22 '16 at 20:00

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


  • I also needed this on 16.04, to fix the original error. But I've got a new error for a libGLU.so.1 lib. – Kenny Evitt Nov 2 '17 at 0:25
  • These are all I needed to run DF on Ubuntu 17.10 – badteeth Apr 4 '18 at 21:21
  • Can confirm that this together with Tonioooo's answer lead to a functioning DF installation on 18.04 – JDL Feb 10 '19 at 11:53
  • Tried multiple other answers, but this is the only one that worked for me. – Hatefiend Jun 23 '19 at 13:34

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 \

sudo apt-get install libsdl1.2debian

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

sudo apt-get install libglu1-mesa

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.