Syntax error: "elif" unexpected (expecting "then")

uname -a
Linux jon 3.16.0-10-amd64 #1 SMP Debian 3.16.70-1 (2019-07-22) x86_64 GNU/Linux

java -version:
java version “12.0.2” 2019-07-16
Java™ SE Runtime Environment (build 12.0.2+10)
Java HotSpot™ 64-Bit Server VM (build 12.0.2+10, mixed mode, sharing)
root@jon:/home/jon/Downloads/autopsy_4.12.0#

javac -version:
javac 12.0.2

echo $JAVA_HOME:
/usr/lib/jvm/java-12-oracle/

cd /home/jon/Downloads/autopsy_4.12.0:
sh unix_setup.sh:
**: not foundsh: 5: unix_setup.sh: **
**: not foundsh: 9: unix_setup.sh: **
**: not foundsh: 10: unix_setup.sh: **
---------------------------------------------
Checking prerequisites and preparing Autopsy:
---------------------------------------------
**: not foundsh: 15: unix_setup.sh: **
unix_setup.sh: 22: unix_setup.sh: Syntax error: “elif” unexpected (expecting “then”)

HELP?

www.sleuthkit.org/autopsy/download.php:
Linux will need The Sleuth Kit [Java .deb Debian package]
https://github.com/sleuthkit/sleuthkit/releases/download/sleuthkit-4.6.7/sleuthkit-java_4.6.7-1_amd64.deb
LINK OFF!

apt-get install sleuthkit-java:
Lendo listas de pacotes… Pronto
**Construindo árvore de dependências **
Lendo informação de estado… Pronto
E: Impossível encontrar o pacote sleuthkit-java

Maybe it’s not using Bash your system. What if you type in ‘bash unix_setup.sh’ instead of ‘sh unix_setup.sh’.

1 Like

Hey Brian,

the link is realy unavailable.

Try it: https://github.com/sleuthkit/sleuthkit/releases/download/sleuthkit-4.6.7/sleuthkit-java_4.6.7-1_amd64.deb

I’ve got same “elif” issue and same link unavailable.

I believe the problem with the script is that it has Windows style CRLF endings. Try running dos2unix on it.

Dos2Unix done! It works now!
Thanks

In Linux if I click on Image Gallery, Autopsy closes itself, it crashes…