haheute haheute - 4 months ago 66
Linux Question

permission denied for composer in /usr/local/bin/

I followed the documentation on https://getcomposer.org/doc/00-intro.md#globally to install composer globally on arch linux. When I do

composer self-update
, I get this message:

[ErrorException]
rename(/home/hannes/.composer/cache/composer-temp.phar,/usr/local/bin/composer): Permission denied


The permissions in
/usr/local/bin/
(I changed them to 777, but it did not help):

-rwxrwxrwx 1 hannes users 1104202 30. Mai 18:07 composer


In my home directory I did this:

sudo chmod -R 777 .composer/


In
/etc/php/php.ini
, the
open_basedir
looks so:

open_basedir = /srv/http/:/home/:/tmp/:/usr/share/pear/:/usr/share/webapps/:/usr/local/bin/


I also tried
sudo composer self-update
but it did not work as well and is possibly not the right way. (?). What else could I try to make this work?

Answer

Now, there is a package for composer in arch linux which works for me:

sudo pacman -S composer
Comments