The cause is probably an unterminated quoted string in the installer. (well duh!).
Either run it with the -x option to get more debug information, or open the installer in an editor and look for unmatched pairs of quotes.
Example:
#!/usr/bin/env bash #My demo installer! # echo "starting here!" echo "and an error in this line echo "We will never get here!"
Notice the missing closing quote ("
) in the second echo line.
Edit:
I just downloaded a file called xampp-linux-x64-1.8.3-1-installer.run
from sourceforge (which I assume is the same file as you are using) and when I opened it in vim I noticed it starts with ^?ELF^
. This file seems to be an ELF binary.
Using the file command on it confirms this:
file: ELF 32-bit LSB executable, Intel 80386, version 1 (GNU/Linux), statically linked, stripped
It is not a shell script and the normal way to execute it would either be:
xampp-linux-x64-1.8.3-1-installer.run
(assuming the directory is in your search path),- or with the full path prepended. E.g.
./xampp-linux-x64-1.8.3-1-installer.run
if you are already in the same directory where the file is. (This is why @erhun's answer worked).