Could not open input file: composer.phar

Posted one year ago

If you’re having the above issue run the following command.

curl -sS | php
mv composer.phar /usr/local/bin/composer

Then set up an alias

 alias composer='/usr/local/bin/composer.phar'

You can then run the command as “composer

To check that it’s working run

composer --version

You can require files as

composer require 


composer require vlucas/phpdotenv

As opposed to php composer.phar require vlucas/phpdotenv