2

I'm trying to install Dwarf Fortress, and you have to unpack the file in a certain way. Here are the instructions they give:

Unpacking: Dwarf Fortress is shipped as a (bzip2) compressed tar archive. It will extract into a new directory called df_linux. So, cd to wherever you want the game to be unpacked, and then run tar xjf /path/to/df_XX_YY_linux.tar.bz2 (where df_XX_YY_linux.tar.bz2 is the filename). Then run cd df_linux to change into the new directory.

I cd'd to Desktop, where I wanted to unpack the file. However, when I entered tar xjf /path/to/df_XX_YY_linux.tar.bz2, this was the result:

pickle@pickle-NC10:~/Desktop$ tar xjf /path/to/df_34_11_linux.tar.bz2
tar (child): /path/to/df_34_11_linux.tar.bz2: Cannot open: No such file or directory
tar (child): Error is not recoverable: exiting now
tar: Child returned status 2
tar: Error is not recoverable: exiting now

I already am on a 32-bit system, but I still tried to use sudo apt-get install ia32-libs libsdl-image1.2 libsdl-sound1.2 libsdl-ttf2.0-0 to see if it would change anything. As I expected, no change. The filename is correct, I double checked. I'm not experienced with using the terminal, so is there something I'm missing? Any help will be greatly appreciated.

By the way, if you want a link straight to the installation page for Dwarf Fortress, here you go.

Update: I tried using

pickle@pickle-NC10:~/Desktop$ tar xjf /path/to/home/pickle/Downloads/df_34_11_linux.tar.bz2

Same result as before. This is me using the complete file name, same response as before.

  • The file name is not actually /path/to/df_34_11_linux.tar.bz2. It will be something like /home/kster/Downloads/df_34_11_linux.tar.bz2. It will be wherever you chose to save the file when you downloaded. – terdon May 20 '14 at 21:13
  • @terdon kster being what exactly? The computer's name? – Kster May 20 '14 at 21:24
  • No, that's your username. I don't know what it is so I used the one you used here. Where did you save this file you downloaded? – terdon May 20 '14 at 21:27
  • Okay, I tried 'pickle@pickle-NC10:~/Desktop$ tar xjf /path/to/home/pickle/Downloads/df_34_11_linux.tar.bz2' Same result – Kster May 20 '14 at 21:33
  • Please edit your question to add extra info, it is hard to read and easy to miss in the comments. You can then ping the user who asked for the information by leaving a comment and including a @ before their username. For example, to ping me: @terdon. – terdon May 20 '14 at 21:33
7

There are two problems, first of all, the "/path/to/" is a placeholder that you should replace with the actual values. In fact, most of the time it just mean tar Downloads/df_*_linux.tar.bz2 if you downloaded DF with a browser. The other problem is due missing libraries. Since version 0.43.05, you can get 64-bits builds and watching that the default Ubuntu image offered to users is the 64-bits, this should not offer more complications than necessary.

The required libraries can be listed, after you extracted the tar file, with a simple ldd df_linux/libs/Dwarf_Fortress, and passing the library path to dpkg -S which would list the packages. Most of these would be already installed, try to find those that are "not found", which normally is the library that the libsdl-ttf2.0-0 package provides.

| improve this answer | |
  • Awesome! It's working! Now I just need to see if I can fix the sound. If the problems persist, I'll tag you guys in this thread. Thanks a bunch! – Kster May 20 '14 at 21:55
  • Working perfectly now! A huge thank you to both @terdon and @Braiam! – Kster May 20 '14 at 22:18
  • Could you explain how you knew which libs to install from the repo? I appreciate the answer, but in the interest of self-reliance, I'd like to be able to figure out how to determine something like this on my own in the future. Were the necessary packages simply listed somewhere? Thanks in advance. – Baku9 Mar 31 '16 at 13:13
  • @J.D.Holland You can search here for a package which contains a given file (lib). Limit your search to architecture i386, and to your version of Ubuntu. For example, this search shows that the package named libsdl1.2debian contains libSDL-1.2.so.0. – jpaugh Jun 15 '16 at 0:13
  • @J.D.Holland Finding the right libs is simply a matter of trying to run ./df, and seeing which file it complains about: ./libs/Dwarf_Fortress: error while loading shared libraries: libSDL_ttf-2.0.so.0: cannot open shared object file: No such file or directory. Then, rinse and repeat. – jpaugh Jun 15 '16 at 0:14

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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