Frictional Games Forum (read-only)
Install script won't run - Printable Version

+- Frictional Games Forum (read-only) (https://www.frictionalgames.com/forum)
+-- Forum: Technical Support (https://www.frictionalgames.com/forum/forum-57.html)
+--- Forum: Technical Support - Amnesia: A Machine for Pigs (https://www.frictionalgames.com/forum/forum-52.html)
+---- Forum: Linux - AMFP (https://www.frictionalgames.com/forum/forum-53.html)
+---- Thread: Install script won't run (/thread-22830.html)



Install script won't run - salass00 - 09-10-2013

I just downloaded the Linux version of AMFP from GamersGate (I preordered it) but I can't get the install script to work.

I extracted the rar archive:
$ unrar e ~/Downloads/AmnesiaAMFP-1.0.0-Linux.rar

Added execute permissions to the sh script as they were missing:
$ chmod 755 AmnesiaAMFP-1.0.0.sh

But when I try to run it I get:
$ sudo ./AmnesiaAMFP-1.0.0.sh
/bin/sh: 0: Can't open ./AmnesiaAMFP-1.0.0.sh

md5sums of archive and script:
$ md5sum ~/Downloads/AmnesiaAMFP-1.0.0-Linux.rar ./AmnesiaAMFP-1.0.0.sh
5f5a9c5e7d0637166f0b8b9d1f72377c /home/salass00/Downloads/AmnesiaAMFP-1.0.0-Linux.rar
bc92782fafc84475dff306906184e060 ./AmnesiaAMFP-1.0.0.sh

I'm using Ubuntu 12.04 LTS BTW.

Found a solution using google:
http://mavroudisv.eu/blog/2013/04/17/sh-bash-dash-and-ubuntu/

If I type "sudo bash ./AmnesiaAMFP-1.0.0.sh" the install script runs correctly.

I've never had this problem running sh scripts before though...


RE: Install script won't run - Akasu - 09-10-2013

had the same problem. thanks for posting the solution Smile


RE: Install script won't run - Overand - 09-11-2013

(SOLVED!: Edited with solution)

Well, I couldn't get it to work, even with the hints above. I'm on Arch Linux, 64-bit (fully up to date as of 2013-09-10). I got the game via the Humble store, which delivered me a .sh file (I chose via torrent).

My MD5Sum matches yours:

Code:
bc92782fafc84475dff306906184e060  AmnesiaAMFP-1.0.0.sh

But - I get a different error:


Code:
[overand@zaphod machineforpigs]$ sudo bash ./AmnesiaAMFP-1.0.0.sh
Verifying archive integrity... All good.
Uncompressing Mojo Setup..............
./AmnesiaAMFP-1.0.0.sh: line 372: ./startmojo.sh: Permission denied

Incidentally, when just executing this (without sudo, but after doing chmod +x), I get the same error.

The solution? My /tmp directory was set to be non-executable. So - I did the following, which you may need to adapt of course.

Code:
[overand@zaphod machineforpigs]$ pwd
/mnt/data/games/machineforpigs
[overand@zaphod machineforpigs]$ mkdir thetmpdir
[overand@zaphod machineforpigs]$ export TMPDIR=/mnt/data/games/machineforpigs/thetmpdir; bash AmnesiaAMFP-1.0.0.sh



RE: Install script won't run - Urkle - 09-19-2013

you can also use
Code:
./AmesiaAMFP-1.0.0.sh --target /mnt/data/games/machineforpigs/thetmpdir/

I'll be tweaking the startup portion of that to stop assuming that /tmp is executable (which frankly a LOT of installers make that assumption.


RE: Install script won't run - Overand - 09-19-2013

(09-19-2013, 08:22 PM)Urkle Wrote: --SNIP--
I'll be tweaking the startup portion of that to stop assuming that /tmp is executable (which frankly a LOT of installers make that assumption.

Yes, this is true - I think the /tmp set to non-executable thing is mostly a convention on servers moreso than workstations, but I'm probably not the ONLY person out there with that going on, heh. I would have figured it out quicker if the error had been a bit more verbose (such as including the full path of where it was failing to run).


RE: Install script won't run - Urkle - 09-19-2013

(09-19-2013, 09:05 PM)Overand Wrote:
(09-19-2013, 08:22 PM)Urkle Wrote: --SNIP--
I'll be tweaking the startup portion of that to stop assuming that /tmp is executable (which frankly a LOT of installers make that assumption.

Yes, this is true - I think the /tmp set to non-executable thing is mostly a convention on servers moreso than workstations, but I'm probably not the ONLY person out there with that going on, heh. I would have figured it out quicker if the error had been a bit more verbose (such as including the full path of where it was failing to run).

Yeah I need to pull in more of the makeself customizations from nixstaller over. As there are checks for this in there.

Or I just make it NOT use tmp at all.. it's only extracting out 1 MB max.. as it it references the original .sh to fetch the "install.zip" that was appended to itSmile