Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

EDIT: Found the answer -- the binary is 32bit, I was installing 64bit libraries. Installing like sudo apt-get install libsdl1.2debian:i386 works.

I'm trying to get Dwarf Fortress to work under Ubuntu 14.04. It comes as a dynamically linked binary with some dependencies that I don't have yet.

So I run ldd on it:

$ ldd libs/Dwarf_Fortress
linux-gate.so.1 =>  (0xf76e3000)
libSDL-1.2.so.0 => not found
libgraphics.so => /home/remco/src/df_linux/libs/libgraphics.so (0xf72af000)
libstdc++.so.6 => /home/remco/src/df_linux/libs/libstdc++.so.6 (0xf71d1000)
libm.so.6 => /lib/i386-linux-gnu/libm.so.6 (0xf718b000)
libgcc_s.so.1 => /home/remco/src/df_linux/libs/libgcc_s.so.1 (0xf7170000)
libc.so.6 => /lib/i386-linux-gnu/libc.so.6 (0xf6fc1000)
libpthread.so.0 => /lib/i386-linux-gnu/libpthread.so.0 (0xf6fa5000)
/lib/ld-linux.so.2 (0xf76e4000)
libgtk-x11-2.0.so.0 => not found
libgobject-2.0.so.0 => not found
libSDL-1.2.so.0 => not found
libSDL_image-1.2.so.0 => not found
libGLU.so.1 => not found
libSDL_ttf-2.0.so.0 => not found

Let's go for the first. apt-file search tells me that libSDL-1.2.so.0 is provided by 'libsdl1.2debian', so I install that.

Sure enough:

$ ls -l /usr/lib/x86_64-linux-gnu/libSDL*
lrwxrwxrwx 1 root root     20 mei 10 06:40 /usr/lib/x86_64-linux-gnu/libSDL-1.2.so.0 -> libSDL-1.2.so.0.11.4
-rw-r--r-- 1 root root 427600 mei 10 06:40 /usr/lib/x86_64-linux-gnu/libSDL-1.2.so.0.11.4

And this directory is mentioned in /etc/ld.so.conf.d/x86_64-linux-gnu.conf.

ldconfig works too, at least, apart from somee warning messages (sorry for the Dutch):

$ sudo ldconfig -v | grep libSDL
/sbin/ldconfig.real: Kan status van /lib/i686-linux-gnu niet opvragen: Bestand of map bestaat niet
/sbin/ldconfig.real: Kan status van /usr/lib/i686-linux-gnu niet opvragen: Bestand of map bestaat niet
/sbin/ldconfig.real: Pad '/lib/x86_64-linux-gnu' is meerdere malen opgegeven
/sbin/ldconfig.real: Pad '/usr/lib/x86_64-linux-gnu' is meerdere malen opgegeven
/sbin/ldconfig.real: /lib/i386-linux-gnu/ld-2.19.so is the dynamic linker, ignoring
/sbin/ldconfig.real: /lib/x86_64-linux-gnu/ld-2.19.so is the dynamic linker, ignoring
libSDL-1.2.so.0 -> libSDL-1.2.so.0.11.4

The "meerdere malen opgegeven" errors mean that the path occurs multiple times in /etc/ld.so.conf.d/, seems OK to me.

The last line tells me that the right file has been found. Unfortunately, ldd still gives the exact same output as above.

Is there a step I'm missing? Do I need to reload something? As far as I can see, ldconfig works correctly, but ldd still doesn't find the file, and I thought it would.

share|improve this question

1 Answer 1

The problem was that Dwarf_Fortress was a 32-bit binary (I found out with file Dwarf_Fortress), and the libraries I was installing were 64-bit. Adding :i386 at the end of the apt-get command installs the i386 versions of the libraries, and that works.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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