beckrecca
beckrecca

Reputation: 1

Composer error: "Could not open input file: /usr/bin/composer.phar"

I have successfully run composer for Laravel projects in the past, but this time it doesn't want to work. None of the existing threads on StackOverflow had any useful solutions for me.

I re-installed composer, and it lives at Users/becky. I tried moving it to /usr/bin/, since that seems to be where CL thinks it lives, but then I get this message: "No such file or directory"

Okay! I'm stumped! Any takers?

Upvotes: 0

Views: 3460

Answers (2)

Edward Haber
Edward Haber

Reputation: 151

Based on the name of your user directory, I'm guessing you're on OS X. OS X, since El Capitan, does not allow access to /usr/bin. Instead, install composer in /usr/local/bin. That directory is in your path by default and you have access to it.

To move it from your directory, use:

mv /Users/becky/composer.phar /usr/local/bin/composer.phar

Then create an alias:

alias composer="/usr/bin/php /usr/local/bin/composer.phar"

Upvotes: 0

mfuller526
mfuller526

Reputation: 111

TYPO:

   mv /Users/becky/composer.phar /usr/loca/bin/composer.phar

SHOULD BE:

   mv /Users/becky/composer.phar /usr/local/bin/composer.phar

Upvotes: 1

Related Questions