I am trying to install Anaconda3 in ubuntu14.04 like this:
seyyedhossein@hossein:~$ sh Anaconda3-4.2.0-Linux-x86_64.sh
and I get :
Anaconda3-4.2.0-Linux-x86_64.sh: 16: Anaconda3-4.2.0-Linux-x86_64.sh: 0: not found
Anaconda3-4.2.0-Linux-x86_64.sh: 61: Anaconda3-4.2.0-Linux-x86_64.sh: 0: not found
Anaconda3-4.2.0-Linux-x86_64.sh: 75: Anaconda3-4.2.0-Linux-x86_64.sh: Syntax error: word unexpected (expecting ")")
what is the problem here?
I had installed it on another account (which was initially downloaded from) successfully. but when I logged in to my new account, it just wont run!
Update:
The output of the cat command :
#!/bin/bash
# Copyright (c) 2012-2016 Continuum Analytics, Inc.
# All rights reserved.
#
# Name: Anaconda3
# Version: 4.2.0
# Packages: 195
# PLAT: linux-64
# DESCR: 4.1.1-889-g7ce9b7f
# BYTES: 478051940
# LINES: 558
# MD5: 1ee1f5cb1d92a230e59cc5fce0dca5ba
unset LD_LIBRARY_PATH
echo "$0" | grep '\.sh$' >/dev/null
if (( $? )); then
echo 'Please run using "bash" or "sh", but not "." or "source"' >&2
return 1
fi
THIS_DIR=$(cd $(dirname $0); pwd)
THIS_FILE=$(basename $0)
THIS_PATH="$THIS_DIR/$THIS_FILE"
PREFIX=$HOME/anaconda3
BATCH=0
FORCE=0
while getopts "bfhp:" x; do
case "$x" in
h)
echo "usage: $0 [options]
Installs Anaconda3 4.2.0
-b run install in batch mode (without manual intervention),
it is expected the license terms are agreed upon
-f no error if install prefix already exists (force)
-h print this help message and exit
-p PREFIX install prefix, defaults to $PREFIX
"
exit 2
;;
b)
BATCH=1
;;
f)
FORCE=1
;;
p)
PREFIX="$OPTARG"
;;
?)
echo "Error: did not recognize option, please try -h"
exit 1
;;
esac
done
# verify the size of the installer
wc -c "$THIS_PATH" | grep 478051940 >/dev/null
if (( $? )); then
echo "ERROR: size of $THIS_FILE should be 478051940 bytes" >&2
exit 1
fi
if [[ $BATCH == 0 ]] # interactive mode
then
if [[ `uname -m` != 'x86_64' ]]; then
echo -n "WARNING:
Your operating system appears not to be 64-bit, but you are trying to
install a 64-bit version of Anaconda3.
Are sure you want to continue the installation? [yes|no]
[no] >>> "
read ans
if [[ ($ans != "yes") && ($ans != "Yes") && ($ans != "YES") &&
($ans != "y") && ($ans != "Y") ]]
sh
is notbash
- see DashAsBinSh