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.
What do you think?