Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Error creating new symfony project

On a fresh install of Ubuntu (14.04 LTS) I run the following commands in preparation:

Update app center: sudo apt-get update && sudo apt-get upgrade

Install lamp server: sudo apt-get install lamp-server^

Install curl: sudo apt-get install curl

Install php5-curl: sudo apt-get install php5-curl

From this point I follow the instructions from the current Symfony installation instructions from the beginning here:

sudo curl -LsS http://symfony.com/installer -o /usr/local/bin/symfony
sudo chmod a+x /usr/local/bin/symfony

When I try to create my new project 'projectX' with symfony new projectX I get the following error returned:

/usr/local/bin/symfony: line 1: syntax error near unexpected token `newline'
/usr/local/bin/symfony: line 1: `<!DOCTYPE html>'

Out of desperation I have tried running it sudo as well but then get:

/usr/local/bin/symfony: 2: /usr/local/bin/symfony: Syntax error: newline unexpected

What am I doing wrong? Thanks in advance for your help!

like image 329
Bendy Avatar asked Apr 15 '15 19:04

Bendy


1 Answers

Take a look into the file with head /usr/local/bin/symfony. It seems you didn't download the phar file. Instead you got a html error page saved with curl.

like image 113
Emii Khaos Avatar answered Sep 22 '22 06:09

Emii Khaos