First install the composer like mentioned in the composer installation documentation. I just added here for reference.
curl -sS https://getcomposer.org/installer | php
and then move the file to '/usr/local/bin'.
sudo mv composer.phar /usr/local/bin/composer
Try to run composer -V. If you get a output like Composer version followed by the version number then the composer is installed successfully.
If you get any output like composer: command not found means use the following command to create a alias for the composer. So it will be executed globally.
alias composer='/usr/local/bin/composer'
Now if you run composer -V means you will get the output as Composer Version followed by the version number.
NEXT MAKE SURE TO ADD VENDOR/BIN TO YOUR OSX PATH
Yes, you need to make sure that ~/.composer/vendor/bin directory is in your system's PATH, you can check this by running:
echo $PATH
If you can't see it there, then you need to add this to your ~/.bash_profile:
export PATH=$PATH:~/.composer/vendor/bin
No comments:
Post a Comment