Bay 12 Games Forum

Please login or register.

Login with username, password and session length
Advanced search  

Author Topic: Can't get it to install? (Ubuntu)  (Read 1160 times)

Reascr

  • Escaped Lunatic
    • View Profile
Can't get it to install? (Ubuntu)
« on: July 09, 2014, 10:57:26 am »

I know I've done it right, but when I try to launch it with ./df I get "Syntax Error: "(" unexpected" and when I do just "df" I get what I assume are my drives and folders. Please not that I'm so new to Linux and Ubuntu, I got it yesterday (On my shitty Chromebook)

Thanks for any help, I need to have stuff on this for my trips, and I think Dwarf Fortress is a good one.
Logged

greycat

  • Bay Watcher
    • View Profile
Re: Can't get it to install? (Ubuntu)
« Reply #1 on: July 09, 2014, 11:37:08 am »

Corrupted download, possibly?
Logged
Hell, if nobody's suffocated because of it, it hardly counts as a bug! -- StLeibowitz

itisnotlogical

  • Bay Watcher
  • might be dat boi
    • View Profile
Re: Can't get it to install? (Ubuntu)
« Reply #2 on: July 09, 2014, 01:07:25 pm »

Have you tried just clicking the 'DF' script in the folder?
Logged
This game is Curtain Fire Shooting Game.
Girls do their best now and are preparing. Please watch warmly until it is ready.

glopso

  • Bay Watcher
    • View Profile
Re: Can't get it to install? (Ubuntu)
« Reply #3 on: July 09, 2014, 02:40:55 pm »

Have you tried just clicking the 'DF' script in the folder?
That would do almost exactly the same thing, except that nothing is output to a terminal
Logged

glopso

  • Bay Watcher
    • View Profile
Re: Can't get it to install? (Ubuntu)
« Reply #4 on: July 09, 2014, 02:42:11 pm »

Have you tried just clicking the 'DF' script in the folder?
That would do almost exactly the same thing, except that nothing is output to a terminal

EDIT: df (without the ./ and not in the dwarf fortress directory) is a utility that tells you how much free space you have, run "man df" for more info

EDIT2: This was meant to be and edit and not quoting myself, sorry
Logged

FutureSailor

  • Bay Watcher
    • View Profile
Re: Can't get it to install? (Ubuntu)
« Reply #5 on: July 09, 2014, 09:03:17 pm »

With 2012 I was able to get it to work on lubuntu by unpacking the 32 bit libraries it wanted from the debian repositories, then copying the appropriate .so files into df_linux/libs.

With 2014, I'm not sure if this works or not, because I just installed ia32-libs in synaptic and it worked out of the box.

Protip: you might want to add something like this to your .bashrc:

alias dwarf2012="/home/mike/dwarfFortress/df/df_linux/dfhack"
alias dwarf="/home/mike/dwarfFortress/df2014/df_linux/df"

save it, open a new terminal, and type dwarf to launch.

EDIT: To be more precise, I assume you are running a 64 bit kernel? You can check this with uname -a, if you see an x86_64 it means you're running in 64 bit. What steps did you take to make the 32 bit libraries work? Undoing those steps and installing the package ia32-lib might be all you need to do. If you still get that syntax error instead of a "can't find somelibrary.so" message then I don't know what to tell you.
« Last Edit: July 09, 2014, 10:37:07 pm by FutureSailor »
Logged

greycat

  • Bay Watcher
    • View Profile
Re: Can't get it to install? (Ubuntu)
« Reply #6 on: July 10, 2014, 07:43:22 am »

As far as I know, you shouldn't get "Syntax Error: "(" unexpected" from a 32/64-bit library conflict.  In those cases, you should get errors like "libfoobar.so.3 not found".

The syntax error sounds like the kind of message I would expect from a shell (or other interpreter) reading a mangled script.  Or the wrong shell being invoked to read the script.  The ./df script that ships with Dwarf Fortress is extremely standard /bin/sh code (with one annoying bug that I would love to see fixed...).  As long as the #!/bin/sh line at the top is intact, and as long as the /bin/sh symlink on your system actually points to a valid POSIX-style shell (dash, or bash, or ksh, or even zsh) it ought to work.  That's why I guessed that the script might have become corrupted somehow.

The annoying bug in the ./df script is the $* on the last line.  That should be "$@" (with the quotes), or it won't handle arguments with spaces.  That bug has been in the script for years, and I always just fix it myself after installation, right before editing the data/init/ files.
Logged
Hell, if nobody's suffocated because of it, it hardly counts as a bug! -- StLeibowitz

Slyjoker87

  • Bay Watcher
    • View Profile
Re: Can't get it to install? (Ubuntu)
« Reply #7 on: July 10, 2014, 09:19:50 am »

I just tried this on a fresh ubuntu 64-bit install. DF wont run out of the box because you need the 32-bit libraries. Try running ldd on /libs/Dwarf_Fortress and see if you are missing any.

EDIT: DF runs after I installed all of the missing libraries.
« Last Edit: July 10, 2014, 09:37:23 am by Slyjoker87 »
Logged