Bay 12 Games Forum

Please login or register.

Login with username, password and session length
Advanced search  

Author Topic: PSA To Ubuntu Users RE: "Error while loading shared libraries"  (Read 772 times)

Jake

  • Bay Watcher
  • Remember Boatmurdered!
    • View Profile
    • My Web Fiction
PSA To Ubuntu Users RE: "Error while loading shared libraries"
« on: September 19, 2014, 03:57:52 pm »

Getting this error when you try to run DF?

Code: [Select]
./libs/Dwarf_Fortress: error while loading shared libraries: libSDL_image-1.2.so.0:
cannot open shared object file: No such file or directory

As stated at Ask Ubuntu, in order to correct this problem you need the following packages:
Code: [Select]
libsdl-image1.2:i386
libgtk2.0-0:i386
libsdl-ttf2.0-0:i386
libglu1-mesa:i386 (in 14.04 and later)

This probably applies to Mint, Lucid Puppy and any other Debian fork you may happen to be trying to run DF on if you're getting that error message, but I mentioned Ubuntu users specifically because it's the distro almost everyone has heard of.
Logged
Never used Dwarf Therapist, mods or tilesets in all the years I've been playing.
I think Toady's confusing interface better simulates the experience of a bunch of disorganised drunken dwarves running a fort.

Black Powder Firearms - Superior firepower, realistic manufacturing and rocket launchers!

MODcrazy

  • Bay Watcher
    • View Profile
Re: PSA To Ubuntu Users RE: "Error while loading shared libraries"
« Reply #1 on: September 20, 2014, 09:27:09 am »

http://dwarffortresswiki.org/index.php/Installation#Linux explains it REALLLY well, too!!

Whithout that I wouldn't ever have it got to run!
Logged

draeath

  • Bay Watcher
  • So it has come to this...
    • View Profile
Re: PSA To Ubuntu Users RE: "Error while loading shared libraries"
« Reply #2 on: September 28, 2014, 11:28:30 am »

Quick tip, in general:

'ldd /path/to/binary' will tell you what libraries are loaded, and what are missing. You can use your distros package manager to search for whatever provides a given file. For example:

yum provides */somefilename
apt-file search filename

"provides" is a standard option for yum. apt-file is an equivalent for dpkg based distros like ubuntu, but it's an extra package you need to install (and has it's own metadata update as well)



Another tip: if you need to use a library but don't or can't install the package, get and extract the package and put the library somewhere. When you start the game, set/append the variable LD_LIBRARY_PATH to contain the directory you put the library in. If you're doing several or appending, ordering matters (first match wins). Debian packages can be extracted with 'ar' - after doing so look in data.tar.* for files (other files are metadata/scripts for the packaging system). RPM packages can be converted to cpio archives with rpm2cpio, which you can then toss at cpio for extraction.
« Last Edit: September 28, 2014, 11:31:18 am by draeath »
Logged
Urist McAlchemist cancels extract isotope: interrupted by supercriticality accident.
This kea is so raw it stole my wheelbarrow!