Running Composer returns: “Could not open input file: composer.phar”

If you followed instructions like these:

https://getcomposer.org/doc/00-intro.md

Which tell you to do the following:

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

Then it’s likely that you, like me, ran those commands and didn’t read the next part of the page telling you to stop referring to composer.phar by its full name and abbreviate it as an executable (that you just renamed with the mv command). So this:

$ php composer.phar update friendsofsymfony/elastica-bundle

Becomes this:

$ composer update friendsofsymfony/elastica-bundle

Leave a Comment