Bay 12 Games Forum

Please login or register.

Login with username, password and session length
Advanced search  

Author Topic: Linux guide to install Dwarf Fortress  (Read 18503 times)

agapetos

  • Bay Watcher
    • View Profile
    • Vegantletika
Linux guide to install Dwarf Fortress
« on: February 18, 2012, 01:37:26 pm »

Hi,
receantly i've installed Linux to my Asus netbook (r051) and now I would like to install Dwarf fortress. Since I am still a newbie for all those scary Linux commands, I would be happy if someone would help me with installation.

I've downloaded the Linux version from bay12 site: http://www.bay12games.com/dwarves/df_34_02_linux.tar.bz2

I've first unpacked it using command:
Code: [Select]
tar -xjvf df_34_02_linux.tar.bz2This is pretty much where it stops for me - code:
Code: [Select]
./install doesn't do anything (read somewhere it would be the next step). When I try to run the file "df" using code:
Code: [Select]
./df it says:
Code: [Select]
./df: ./libs/Dwarf_Fortress: /lib/ld-linux.so.2: bad ELF interpreter: No such file or directory
Could you help me somehow, because I've really enjoyed playing it on the windows 7, and I would not like to use windows version on wine now that there is a linux version.

I have a linux netbook Asus r051 running Linux Fedora 16 LXDE 64-bit version. I have 1Gb of memmory and dual core procesor 1Ghz.
Thanks to everyone that will be willing to help a newbie in the world of opensource :)
Logged

Bluehotdog5

  • Bay Watcher
    • View Profile
Re: Linux guide to install Dwarf Fortress
« Reply #1 on: February 18, 2012, 01:56:10 pm »

This sounds like a problem with linux, specifically a problem with the 64-bit distro your using. 64-bit operating systems often come with a lot of bugs, this is an example of that.
Here's a forum post I found at the fedora forums: http://forums.fedoraforum.org/showthread.php?t=268429

One of the reasons I never use 64 bit linux distros.

Anyway, you'll probably find more help at a linux forum, since most people use windows. I do play it on linux, I use Debian 32-bit.
Logged

KaminaSquirtle

  • Bay Watcher
    • View Profile
Re: Linux guide to install Dwarf Fortress
« Reply #2 on: February 18, 2012, 02:11:58 pm »

What? That's not true, 64-bit distros are just as stable as 32-bit ones nowadays. This is not a bug at all. Rather, DF is a 32-bit application, and thus requires 32-bit versions of the libraries it uses. Since the distro is 64-bit, it only installs 64-bit versions of the libraries by default. The thread Bluehotdog linked to has info on how to install 32-bit versions of libraries. In addition to glibc, DF'll need several other 32-libraries, such as gtk2, openal, sdl, etc. You should be able to use the method in the posted thread to find the exact package names of those and install them.

Don't hesitate to post further if you do run into more trouble, there are actually quite a few Linux users here willing to help out.
Logged

Bluehotdog5

  • Bay Watcher
    • View Profile
Re: Linux guide to install Dwarf Fortress
« Reply #3 on: February 18, 2012, 02:14:15 pm »

What? That's not true, 64-bit distros are just as stable as 32-bit ones nowadays. This is not a bug at all. Rather, DF is a 32-bit application, and thus requires 32-bit versions of the libraries it uses. Since the distro is 64-bit, it only installs 64-bit versions of the libraries by default. The thread Bluehotdog linked to has info on how to install 32-bit versions of libraries. In addition to glibc, DF'll need several other 32-libraries, such as gtk2, openal, sdl, etc. You should be able to use the method in the posted thread to find the exact package names of those and install them.

Don't hesitate to post further if you do run into more trouble, there are actually quite a few Linux users here willing to help out.
really? I use to use debian 64 bit, and I uninstalled it for the 32 bit version because of the amount of bugs I got. Might just be debian though
Logged

agapetos

  • Bay Watcher
    • View Profile
    • Vegantletika
Re: Linux guide to install Dwarf Fortress
« Reply #4 on: February 18, 2012, 02:33:17 pm »

Ok, here is the checklist of additional things I've installed:
  • glibc.i686
  • gtk2
  • openal
  • SDL
Here is the error that I'm now getting:
Code: [Select]
./libs/Dwarf_Fortress: error while loading shared libraries: libSDL-1.2.so.0: cannot open shared object file: No such file or directory
Logged

KaminaSquirtle

  • Bay Watcher
    • View Profile
Re: Linux guide to install Dwarf Fortress
« Reply #5 on: February 18, 2012, 02:58:08 pm »

Ok, here is the checklist of additional things I've installed:
  • glibc.i686
  • gtk2
  • openal
  • SDL
Here is the error that I'm now getting:
Code: [Select]
./libs/Dwarf_Fortress: error while loading shared libraries: libSDL-1.2.so.0: cannot open shared object file: No such file or directory
Looks like you installed the 64-bit version of SDL (and likely openal and gtk2) instead of the 32-bit version. Try to install SDL.i686, openal.i686, etc. instead. Additionally, keep in mind that that list isn't meant to be an exhaustive one. I know you'll also need libsndfile, at the least.
What? That's not true, 64-bit distros are just as stable as 32-bit ones nowadays. This is not a bug at all. Rather, DF is a 32-bit application, and thus requires 32-bit versions of the libraries it uses. Since the distro is 64-bit, it only installs 64-bit versions of the libraries by default. The thread Bluehotdog linked to has info on how to install 32-bit versions of libraries. In addition to glibc, DF'll need several other 32-libraries, such as gtk2, openal, sdl, etc. You should be able to use the method in the posted thread to find the exact package names of those and install them.

Don't hesitate to post further if you do run into more trouble, there are actually quite a few Linux users here willing to help out.
really? I use to use debian 64 bit, and I uninstalled it for the 32 bit version because of the amount of bugs I got. Might just be debian though
Strange. I've had no problems with 64-bit Arch, and I haven't heard about any problems with 64-bit Debian either. I'm interested now, what kinds of bugs were you experiencing?
Logged

Jake

  • Bay Watcher
  • Remember Boatmurdered!
    • View Profile
    • My Web Fiction
Re: Linux guide to install Dwarf Fortress
« Reply #6 on: February 18, 2012, 03:02:33 pm »

If all else fails, try the Windows version running in wine. The FPS loss should be negligible.
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!

Bluehotdog5

  • Bay Watcher
    • View Profile
Re: Linux guide to install Dwarf Fortress
« Reply #7 on: February 18, 2012, 03:11:54 pm »

Ok, here is the checklist of additional things I've installed:
  • glibc.i686
  • gtk2
  • openal
  • SDL
Here is the error that I'm now getting:
Code: [Select]
./libs/Dwarf_Fortress: error while loading shared libraries: libSDL-1.2.so.0: cannot open shared object file: No such file or directory
Looks like you installed the 64-bit version of SDL (and likely openal and gtk2) instead of the 32-bit version. Try to install SDL.i686, openal.i686, etc. instead. Additionally, keep in mind that that list isn't meant to be an exhaustive one. I know you'll also need libsndfile, at the least.
What? That's not true, 64-bit distros are just as stable as 32-bit ones nowadays. This is not a bug at all. Rather, DF is a 32-bit application, and thus requires 32-bit versions of the libraries it uses. Since the distro is 64-bit, it only installs 64-bit versions of the libraries by default. The thread Bluehotdog linked to has info on how to install 32-bit versions of libraries. In addition to glibc, DF'll need several other 32-libraries, such as gtk2, openal, sdl, etc. You should be able to use the method in the posted thread to find the exact package names of those and install them.

Don't hesitate to post further if you do run into more trouble, there are actually quite a few Linux users here willing to help out.
really? I use to use debian 64 bit, and I uninstalled it for the 32 bit version because of the amount of bugs I got. Might just be debian though
Strange. I've had no problems with 64-bit Arch, and I haven't heard about any problems with 64-bit Debian either. I'm interested now, what kinds of bugs were you experiencing?
Mostly compatibility issues, for example, the sound in wine wouldn't work, which is the majority of the reason I uninstalled and switched to 32-bit Debian. Along with various other issues I can't remember. I noticed no speed difference, despite hearing that 64-bit is faster, but that's probably just because of the crappy processor I have. I'm not sure if the no sound issue is still a problem in wine or not, but if they fix that, then I might consider installing 64-bit next time. But as long as this is the computer the rest of my family uses, any bug that affects my sister or my parents is more weight on my back, which is why I prefer 32-bit. Less bugs.

Oh, and last time I ran DF in wine, it ran perfectly, so you shouldn't have too much of an issue with that if all else fails.
Logged

agapetos

  • Bay Watcher
    • View Profile
    • Vegantletika
Re: Linux guide to install Dwarf Fortress
« Reply #8 on: February 18, 2012, 04:02:08 pm »

Great - it works :)
The only one tiny problem remains:
Code: [Select]
Gtk-WARNING **: Unable to locate theme engine in module_path: "clearlooks",
Initializing OpenAL failed, no sound will be played
But I don't think it is much of a problem.

So, to all others who are struggling with this problem, it was just about reading what library is problem and installing the same one with addition of .i686 on the end. (although the package doesn't always have the same name as the error message).
*** This adding numbers to the end is a solution just for Fedora users. Other distros have their own way of dealing around this problem ***

Guys, thank you for all your help :)
« Last Edit: February 19, 2012, 03:37:24 am by agapetos »
Logged

Bluehotdog5

  • Bay Watcher
    • View Profile
Re: Linux guide to install Dwarf Fortress
« Reply #9 on: February 18, 2012, 04:08:16 pm »

I always get the second openAL message when I play, but it's not much of an issue since I usually just listen to Pandora while I'm playing df
Logged

KaminaSquirtle

  • Bay Watcher
    • View Profile
Re: Linux guide to install Dwarf Fortress
« Reply #10 on: February 18, 2012, 04:37:15 pm »

Great - it works :)
The only one tiny problem remains:
Code: [Select]
Gtk-WARNING **: Unable to locate theme engine in module_path: "clearlooks",
Initializing OpenAL failed, no sound will be played
But I don't think it is much of a problem.

So, to all others who are struggling with this problem, it was just about reading what library is problem and installing the same one with addition of .i686 on the end. (although the package doesn't always have the same name as the error message).

Guys, thank you for all your help :)
You can safely ignore the Gtk warning, yeah. As for the OpenAL message, this post has a solution.

And, just so people who may find this thread in the future don't get confused, adding .i686 to the end of a package name only works if you're running Fedora. Other distros have other ways of providing 32-bit libs to 64-bit users.

Mostly compatibility issues, for example, the sound in wine wouldn't work, which is the majority of the reason I uninstalled and switched to 32-bit Debian. Along with various other issues I can't remember. I noticed no speed difference, despite hearing that 64-bit is faster, but that's probably just because of the crappy processor I have. I'm not sure if the no sound issue is still a problem in wine or not, but if they fix that, then I might consider installing 64-bit next time. But as long as this is the computer the rest of my family uses, any bug that affects my sister or my parents is more weight on my back, which is why I prefer 32-bit. Less bugs.

Oh, and last time I ran DF in wine, it ran perfectly, so you shouldn't have too much of an issue with that if all else fails.
Yeah, WINE has to be 32-bit because so many Windows things are 32-bit, so it does have similar problems to DF when run on a 64-bit system. As for speed differences, the main difference is that 64-bit OSes can use more than the 4GB RAM most 32-bit OSes are limited to. Modern CPUs do implement some faster instruction sets for x64, but it's generally not a huge difference. If your computer's older and has less than 4GB RAM, there's really no point to using a 64-bit distro if it's giving you problems.

I can tell you that I don't have any sound issues with WINE on 64-bit Arch. I don't know about its state on Debian, though.
Logged

HarryFromMarydelDE

  • Bay Watcher
    • View Profile
Re: Linux guide to install Dwarf Fortress
« Reply #11 on: February 18, 2012, 06:57:38 pm »

On Gentoo, 32 bit libs start with emul-linux-x86. I installed emul-linux-x86-gtklibs and emul-linux-x86-sdl and DF ran fine.

-Harry
Logged

barryvm

  • Escaped Lunatic
    • View Profile
Re: Linux guide to install Dwarf Fortress
« Reply #12 on: March 08, 2012, 02:47:22 pm »

The solution for the sound problem mentioned above did not work for me because the libsndfile library was not present at /usr/lib/
If you find yourself in a similar situation, you will find the libsndfile library in one of the architecture gnu library folders (for instance the i386-linux-gnu folder for 32 bit systems).
There should be at least one copy of this library available and you can use the same command as mentioned above to create a link to the library.
Logged
Who do you call shorty?