Syntax error near unexpected token `newline' while installing Predictionio

64,447

Solution 1

Well, the file that you're putting between the quotes, to execute as a bash command, is a 15917 byte bash script (written by Somebody Else, and you're running it without inspection, but that's off topic). If you split it up into simpler commands, you could:

curl -s https://install.prediction.io/install.sh >install.sh
# inspect install.sh here
bash ./install.sh
# if it fails, do bash -x ./install.sh
rm ./install.sh

Solution 2

Correct syntax would be:

curl -sSL https://install.prediction.io/install.sh | sh

or

wget -qO- https://install.prediction.io/install.sh | sh
Share:
64,447

Related videos on Youtube

xabush
Author by

xabush

Updated on September 18, 2022

Comments

  • xabush
    xabush over 1 year

    I'm new to Prediction.io and when I try to install it following the instruction at this page I get the following error:

    bash: -c: line 0: syntax error near unexpected token `newline' 
    bash: -c: line 0: `<!DOCTYPE html>'
    

    The command I'm executing is

    bash -c "$(curl -s https://install.prediction.io/install.sh)"
    

    How can I solve this? What went wrong?

    • steeldriver
      steeldriver almost 8 years
      You forgot to close your quote?
    • xabush
      xabush almost 8 years
      Great Observation! It was a typo error when writing the question but the command stills shows the same error.