16

When I run ./df I get this error:

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

So I tried to install that lib by running:

sudo apt-get install libsdl-ttf2.0-0:i386

But it is already installed:

libsdl-ttf2.0-0:i386 is already the newest version

I then searched around and ran this:

$ ldd ~/df_linux/libs/Dwarf_Fortress

And got a ton of libraries and I think I found the problem, it is given out by this line:

libSDL_ttf-2.0.so.0 => not found

I can't find any more information, I'm lost. How should I proceed?

  • Locate a file with a name starting with libSDL_ttf_2.0.so. In the directory, create a symbolic link called libSDL_ttf-2.0.so.0 to that file. – Jos Aug 23 '16 at 12:20
  • I ran this command: sudo find / -type f -name "libSDL_ttf_2.0.so*", to try and find it but it didn't succeed. – Diogo Meneses Aug 23 '16 at 12:29
  • I notice Dwarf Fortress expects a file called libSDL_xxx while the package is called libsdl_xxx (lowercase). Try to find a file in lowercase and create an uppercase link to it? – Jos Aug 23 '16 at 12:33
  • Ok I found several by using lowercase and - instead of underscore. I don't which one to choose, or how to actually make a sym link. You said "in the directory", which one were you referring to? – Diogo Meneses Aug 23 '16 at 12:57
  • You would create a link in the directory where you find the lib file, using sudo ln -s [target file] libSDL_ttf-2.0.so.0. I don't suppose there is any harm in trying them all one by one. – Jos Aug 23 '16 at 13:08
  • But how will the sym link be connect to dwarf fortress like that? For example I have this path /usr/share/lintian/overrides/libsdl-ttf2.0-0, I run "sudo ln -s /usr/share/lintian/overrides/libsdl-ttf2.0-0 libSDL_ttf-2.0.so.0"? When I run the game it will search for the sym link and find that? – Diogo Meneses Aug 23 '16 at 13:23
  • Yes, it is apparently looking for a file called libSDL_ttf-2.0.so.0. No such file exists at this moment. When you create a link with that name, linked to a file that does exist, DF will use that. – Jos Aug 23 '16 at 13:26
  • didn't work :/ still get the same error – Diogo Meneses Aug 23 '16 at 13:26
  • How can I verify if the sym link was created correctly? Does it create a file? – Diogo Meneses Aug 23 '16 at 13:27
  • yeah it created a file, aff, still no luck – Diogo Meneses Aug 23 '16 at 13:27

2 Answers2

26

Are you trying to run the most current version of Dwarf Fortress (0.43.05)? I was having the same problem as you. I created a soft link to libSDL_ttf-2.0.so.0 and it didn't work, because it was looking for a 64 bit file.

Try installing the 64 bit version instead:

sudo apt-get install libSDL-ttf2.0-0

You should see the file appear in your x86_64-linux-gnu directory. The game ran for me after I installed it.

0

For me running this worked

sudo apt-get install libsdl2-mixer-2.0-0 libsdl2-image-2.0-0 libsdl2-ttf-2.0-0

Got the command from this thread

dispread
  • 1
  • 1