Bay 12 Games Forum

Please login or register.

Login with username, password and session length
Advanced search  
Pages: [1] 2

Author Topic: (Maybe not-so-)quick help for a linux noob? (Solved)  (Read 12501 times)

Bluerobin

  • Bay Watcher
    • View Profile
(Maybe not-so-)quick help for a linux noob? (Solved)
« on: June 09, 2010, 10:12:34 am »

Hey all, I'm trying out Linux (wubi install of Ubuntu) and figured I'd try getting DF to run. I think I have everything I need (downloaded the linux install from here, extracted to desktop) but when I try to run the df file it gives me an error: "bash: ./Dwarf_Fortress: No such file or directory". The problem is, that file is very much there and the permissions seem fine. I hope I'm just missing something stupid. Here's a screenshot of the typical attempt (I tried just running the Dwarf_Fortress file directly in this attempt but it's exactly the same error if I run df).
Spoiler (click to show/hide)
« Last Edit: June 09, 2010, 06:41:14 pm by Bluerobin427 »
Logged
The moment the lever was pulled, somebody's pet kitten stepped onto the bridge. I read somewhere that if a cat falls more than 11 stories, it instinctively flares its legs out to increase air resistance. This slows it down enough to stick the landing with relatively minor injuries. In Dwarf Fortress, apparently, cats don't do that.

Thief^

  • Bay Watcher
  • Official crazy person
    • View Profile
Re: Quick help for a linux noob?
« Reply #1 on: June 09, 2010, 11:00:03 am »

Well you definitely want to be running ./df in the folder above.

If that doesn't work I'm not sure what's wrong.
Logged
Dwarven blood types are not A, B, AB, O but Ale, Wine, Beer, Rum, Whisky and so forth.
It's not an embark so much as seven dwarves having a simultaneous strange mood and going off to build an artifact fortress that menaces with spikes of awesome and hanging rings of death.

Fourdots

  • Bay Watcher
  • ....
    • View Profile
Re: Quick help for a linux noob?
« Reply #2 on: June 09, 2010, 11:01:05 am »

So, let me try to understand this: when you run ./df in the normal directory, it says that it can't find Dwarf_Fortress. You decided to go into libs and try to run Dwarf_Fortress directly, and that's what you're posted a screenshot of.

Your permissions are identical to those on my computer, so that's not the issue. In fact, I'm stumped - it simply doesn't make sense. What happens if you, say, "cat Dwarf_Fortress" (or "file Dwarf_Fortress")? Does it claim that it can't find it?

What happens if you extract the install again? Perhaps into a different folder, even.
Logged

Bluerobin

  • Bay Watcher
    • View Profile
Re: Quick help for a linux noob?
« Reply #3 on: June 09, 2010, 11:06:27 am »

So, let me try to understand this: when you run ./df in the normal directory, it says that it can't find Dwarf_Fortress. You decided to go into libs and try to run Dwarf_Fortress directly, and that's what you're posted a screenshot of.

Your permissions are identical to those on my computer, so that's not the issue. In fact, I'm stumped - it simply doesn't make sense. What happens if you, say, "cat Dwarf_Fortress" (or "file Dwarf_Fortress")? Does it claim that it can't find it?

What happens if you extract the install again? Perhaps into a different folder, even.

Yeah you got the interpretation right. I can read the file with cat/less/whatever (well, it's binary so 'read' doesn't mean much but it shows me the contents of the file). I'll try reinstalling in a bit when I've got more time.

Edit: Ok, I tried redownloading and extracting and there was no change. I extracted with tar -xvf and by double clicking and letting Ubuntu figure out how to extract it and both gave me a df_linux directory that looked exactly the same and didn't work. To be clear, I just have to type ./df to run df when I'm in the folder it's in, right? I'm not just failing Unix?
« Last Edit: June 09, 2010, 12:15:23 pm by Bluerobin427 »
Logged
The moment the lever was pulled, somebody's pet kitten stepped onto the bridge. I read somewhere that if a cat falls more than 11 stories, it instinctively flares its legs out to increase air resistance. This slows it down enough to stick the landing with relatively minor injuries. In Dwarf Fortress, apparently, cats don't do that.

Calite

  • Bay Watcher
    • View Profile
Re: Quick help for a linux noob?
« Reply #4 on: June 09, 2010, 12:33:08 pm »

If you're IN the folder it is in, you should only have to type it's name, not the ./. IE,

Code: [Select]
[user@Machine df_linux]: bash df

Should start it.

If that still doesn't work, use the full path to the file.

-My original post was fail.-
« Last Edit: June 09, 2010, 12:36:15 pm by Calite »
Logged

Bluerobin

  • Bay Watcher
    • View Profile
Re: Quick help for a linux noob?
« Reply #5 on: June 09, 2010, 12:38:17 pm »

Ah ok, good to know, thanks. Forgot about bash, so just typing df was of course not actually trying to run the df file.

But yeah, it gives the same error.
Logged
The moment the lever was pulled, somebody's pet kitten stepped onto the bridge. I read somewhere that if a cat falls more than 11 stories, it instinctively flares its legs out to increase air resistance. This slows it down enough to stick the landing with relatively minor injuries. In Dwarf Fortress, apparently, cats don't do that.

Calite

  • Bay Watcher
    • View Profile
Re: Quick help for a linux noob?
« Reply #6 on: June 09, 2010, 12:46:23 pm »

Ah ok, good to know, thanks. Forgot about bash, so just typing df was of course not actually trying to run the df file.

But yeah, it gives the same error.

You shouldn't be at /df_linux/lib$, I believe. Try this:

Code: [Select]
cd ~/Desktop/df_linux/
bash df

or

Code: [Select]
~/Desktop/df_linux/df
Logged

Bluerobin

  • Bay Watcher
    • View Profile
Re: Quick help for a linux noob?
« Reply #7 on: June 09, 2010, 12:49:23 pm »

So apparently that first screenshot was confusing to multiple people.

Logged
The moment the lever was pulled, somebody's pet kitten stepped onto the bridge. I read somewhere that if a cat falls more than 11 stories, it instinctively flares its legs out to increase air resistance. This slows it down enough to stick the landing with relatively minor injuries. In Dwarf Fortress, apparently, cats don't do that.

snooptodd

  • Bay Watcher
    • View Profile
Re: Quick help for a linux noob?
« Reply #8 on: June 09, 2010, 01:59:08 pm »

this is strange

first make sure you are in the df_linux dir.
then run ./df  ./ is important it tells bash to look in the current dir for the file. (this probably wont make any difference because for some reason bash looked in the current dir anyway.)

then try running ./libs/Dwarf_Fortress from the df_linux dir
Logged

Fourdots

  • Bay Watcher
  • ....
    • View Profile
Re: Quick help for a linux noob?
« Reply #9 on: June 09, 2010, 02:28:42 pm »

Hmm. If you make a small bash script - say just a file with
Code: [Select]
#!/bin/bash
echo Hello!
and then run it with ./filename.sh (after using chmod to make it executable), what happens?

Trying to figure out if this is an issue with the way you have bash set up; if it's not able to find and execute a file you created, there are larger problems.

Also, does "exec ./df" give the same error? I expect that it would, but while we're trying different ways to invoke commands ...
Logged

Bluerobin

  • Bay Watcher
    • View Profile
Re: Quick help for a linux noob?
« Reply #10 on: June 09, 2010, 02:43:43 pm »

Thanks for the ideas Fourdots. I made up the bash script and it printed Hello! so it looks like that much is ok. I did exec ./df and it closed my terminal window, but it doesn't look like anything else happened. At least this is a new mystery, though.
Logged
The moment the lever was pulled, somebody's pet kitten stepped onto the bridge. I read somewhere that if a cat falls more than 11 stories, it instinctively flares its legs out to increase air resistance. This slows it down enough to stick the landing with relatively minor injuries. In Dwarf Fortress, apparently, cats don't do that.

Fourdots

  • Bay Watcher
  • ....
    • View Profile
Re: Quick help for a linux noob?
« Reply #11 on: June 09, 2010, 02:52:23 pm »

Thanks for the ideas Fourdots. I made up the bash script and it printed Hello! so it looks like that much is ok. I did exec ./df and it closed my terminal window, but it doesn't look like anything else happened. At least this is a new mystery, though.

exec ./df would have replaced the currently running process with df; as it just gave an error message and then exited, that was what I was expecting. Still, there was a very small chance ...

And ... hum. I hate to say this, but have you rebooted? I can't think of any way that doing so might change this, but if it's an issue with bits of the filesystem not agreeing (specifically, bash disagreeing with everything else), it might help (okay, I'm pulling the rationale out of thin air, but rebooting is often a good thing to try, even if as a last resort).

And as the issue seems local to Dwarf_Fortress ... hmm. Perhaps copy it to Dwarf_Fortress2 or something like that, and then try invoking the new file? Though I can't provide a real rationale for the idea.
Logged

Bluerobin

  • Bay Watcher
    • View Profile
Re: Quick help for a linux noob?
« Reply #12 on: June 09, 2010, 03:17:57 pm »

Alright, I've been restarting/rebooting moving between linux and windows 7 as I was setting up the machine today so yeah, I've rebooted. Good idea though.
I tried renaming (both the file name and the file called in df) and it gave the same error. I also tried putting the shell script in the libs folder and calling it with the df file to make sure there wasn't something weird with permissions, but it got called perfectly fine, so it doesn't look like the libs folder's the problem.
Logged
The moment the lever was pulled, somebody's pet kitten stepped onto the bridge. I read somewhere that if a cat falls more than 11 stories, it instinctively flares its legs out to increase air resistance. This slows it down enough to stick the landing with relatively minor injuries. In Dwarf Fortress, apparently, cats don't do that.

Fourdots

  • Bay Watcher
  • ....
    • View Profile
Re: Quick help for a linux noob?
« Reply #13 on: June 09, 2010, 03:30:02 pm »

How about copying the file, to force it into a different set of blocks on the hard drive, and a different inode? Though if you didn't delete the first copy before extracting a new one, that's already happened.
Logged

Bluerobin

  • Bay Watcher
    • View Profile
Re: Quick help for a linux noob?
« Reply #14 on: June 09, 2010, 03:34:52 pm »

Hmm nope, same error. Question, though. I've been using the SDL version because that's all I could easily find. Is there a legacy linux version around?
« Last Edit: June 09, 2010, 03:37:47 pm by Bluerobin427 »
Logged
The moment the lever was pulled, somebody's pet kitten stepped onto the bridge. I read somewhere that if a cat falls more than 11 stories, it instinctively flares its legs out to increase air resistance. This slows it down enough to stick the landing with relatively minor injuries. In Dwarf Fortress, apparently, cats don't do that.
Pages: [1] 2