I'm following this tutorial. I need to install Laravel but I can not get pass through Composer.
Running a line like curl -sS https://getcomposer.org/installer | php
is relatively easy.
I also moved it: sudo mv composer.phar /usr/local/bin/composer
. I have added the PATH (export PATH="$PATH:~/.composer/vendor/bin”
) by editing my .bash_profile, but no results. I can't get it to work.
Is there anyone who knows how to install composer properly?
Did you execute command?
export ~/.bash_profile
after editing this file (also reboot can be as alternative)? Of course as quick hack you can use either php ~/.composer/vendor/bin/composer
or write hardcoded alias in ~/.bash_profile:
alias composer="~/.composer/vendor/bin/composer"
and after editing do not forget to execute export ~/.bash_profile
also check permissions if your current user can execute this file
I really appreciate all the answers above. They all helped to a final answer. It seems that creating an alias inside the .bash_profile with the right path was solution. As of right now I can type "composer" and it will run. The route points directly to where my composer.phar is currently installed. A reboot was necessary as well.
alias composer="usr/local/bin/composer/composer.phar"