Mac OSX Composer Could not open input file: /Users//composer.phar

To most of the people who want to install composer on OSX, usually, the below command is sufficient:

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

However, it could still happen to have error of

Could not open input file: /Users/kayliongmac11air/composer.phar

This is due to shell environment didn’t refresh.

To fix this error, simply run below command:

source ~/.bash_profile

This will refresh the shell environment in your OSX environment.
That’s it, now the alias will take effect.

By Keenlio, July 1, 2020

What do you think?

Leave a Reply

Your email address will not be published. Required fields are marked *


+ two = 4

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>