1

Laravel (ubuntu): after installation of composer in the directory www/laravel i tried to create the project with the command (composer create-project laravel/laravel project1 --prefer-dist) but an error is popped

Error : No command 'composer' found, did you mean: Command 'compose' from package 'mime-support' (main) composer: command not found

1
  • 2
    I think you either need to use ./composer or composer.phar if you "installed" it in that directory. Commented Jan 2, 2015 at 18:04

2 Answers 2

3

The recommended way to install composer is by installing it globally:

$ curl -sS https://getcomposer.org/installer | php
$ mv composer.phar /usr/local/bin/composer

Now you can run:

$ composer

Another way is to install it locally, this is not recommended. That would mean only executing

$ curl -sS https://getcomposer.org/installer | php

Then, you should use:

$ ./composer.phar
# or
$ php composer.phar
Sign up to request clarification or add additional context in comments.

Comments

1

Your composer is not accessible globally or not installed properly.

Use below command to install it globally so that you can run composer command everywhere.

curl -sS https://getcomposer.org/installer | sudo php -- --install-dir=/usr/local/bin --filename=composer

Notice the --filename=composer switch in the command it renames composer.phar to composer so that you can run $ composer instead of $ composer.phar

Complete guide about installing Laravel on Ubuntu can be found here: http://scriptbaker.com/install-laravel-on-ubuntu/

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.