If i type "composer" i get the above error message.
I did on my macbook:
curl -sS https://getcomposer.org/installer | php sudo mv composer.phar /usr/local/bin/composer
to install Composer globally.
I had to manually create the /local/bin/composer directory, maybe this caused the error ?
php composer.phar
works if i in my code directory where the .phar file is.
What could i do to solve the problem and run composer globally ?
My ~/.profile
export PS1="\W: " export CLICOLOR=1 export LSCOLORS=gxBxhxDxfxhxhxhxhxcxcx
~: echo $PATH
/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin:/usr/local/git/bin:/usr/local/bin ~:
If reinstalling Composer using official commands doesn't work, you may try directly running composer-setup. php with the default --install-dir and --filename argument. The composer-setup. php can be downloaded from https://getcomposer.org/installer.
The path /usr/local/bin/composer
is not in your PATH, executables in that folder won't be found.
Delete the folder /usr/local/bin/composer
, then run
$ mv composer.phar /usr/local/bin/composer
This moves composer.phar
into /usr/local/bin/
and renames it into composer
(which is still an executable, not a folder).
Then just use it like:
$ composer ...
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With