How to Install Dwarf Fortress on Ubuntu 16.04

Note: If you don’t know what Dwarf Fortress is, you owe it to yourself to learn a bit about it. It’s one of the most interesting and detailed games/simulations/sandboxes ever created.

I just spent a bit of time getting Dwarf Fortress installed on Ubuntu 16.04. I didn’t find much in the way of up-to-date instructions, so I’m writing down what works as of today (June 2016). If you’re wondering how to install Dwarf Fortress on Ubuntu 16.04, here’s what you’ll want to do:

  1. Download Dwarf Fortress from the official site (SDL version –> Linux), or get the Lazy Newb Pack (grab the newest version at the top).
  2. Install required 32-bit SDL libraries that Dwarf Fortress needs:
sudo apt-get install libsdl-image1.2:i386 libgtk2.0-0:i386 libsdl-ttf2.0-0:i386 libglu1-mesa:i386 libopenal1:i386

These are 32-bit libraries. Chances are you’re running a 64-bit OS, so they may pull in some extra dependencies. If you don’t have these installed, you’ll see errors like:

Dwarf_Fortress: error while loading shared libraries: libSDL_image-1.2.so.0:
    cannot open shared object file: No such file or directory 

Run Dwarf Fortress through the Lazy Newb Pack

Now you can actually start the game. If you’re running the Lazy Newb Pack:

  1. Enter the directory and double-click the PyLNP executable.
  2. If you’re in a terminal, navigate to the directory and run the executable:
    • cd ~/Desktop/path/to/LazyNewbPack
    • ./PyLNP # including the './'

 

Run Vanilla Dwarf Fortress

If you’re just running vanilla Dwarf Fortress, just enter the main df_linux directory and run the ‘df’ executable. This is a .tar.bz2 file, which is not the same as the popular .tar.gz or .tgz file. If you’re wondering how to open a .tar.bz2 file, you’ll want to uncompress and unarchive it with this command:

tar xvjf ~/Downloads/path/to/df_linux.tar.bz2

What those ‘tar’ options mean

The ‘x‘ is for extract, ‘v‘ is for verbose (see each file being unarchived), ‘j‘ is for the bzip2 compression format, ‘f‘ is to make sure that the tar program knows you’re about to tell it the path to the file you want to decompress and unarchive.

 

If You Have No Idea Where to Start

Check out the DasTactic’s excellent Dwarf Fortress video tutorials on YouTube. That will get you started, both with the Lazy Newb Pack and with Dwarf Fortress gameplay.

Enjoy!

4 replies
  1. Philip Shenk says:

    Hello, I had dwarf fortress working before with this Ubuntu Gnome 16.04, but I haven’t been able to get DF 43.05 to work. I assume this is due to the new 64 bit stuff, but I am still a linux n00b and I can’t figure out how to make it work. Is there a different process and/or a different set of libraries for 43.05+?

    • Dave Cohen says:

      Haven’t tried this yet, since I’m too busy to have any Dwarf Fortress time right now :(. I’ll reply when I go through this process myself, but maybe some kind soul will reply to your comment in the meantime.

      Cheers!

  2. RonS says:

    Hey so apparently, Dwarf Fortress is dead set on using libsdl-image1.2:i386 for Ubuntu 16.04. Unfortunately that is now gone and we have Multiarch. That means only libsdl1.2debian:i386 is available.

    DF is refusing to build and gives the same error:

    “./libs/Dwarf_Fortress: error while loading shared libraries: http://libSDL_image-1.2.so .0: cannot open shared object file: No such file or directory”

    It seems DF 43.05 is off limits to 64 bit Ubuntu 16.04 for now.

    Thanks for your help though.

Comments are closed.