问题描述
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
/usr/local/bin/
中的权限(我将其更改为777,但没有帮助):
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/
在/etc/php/php.ini
中,open_basedir
看起来像这样:
open_basedir = /srv/http/:/home/:/tmp/:/usr/share/pear/:/usr/share/webapps/:/usr/local/bin/
我也尝试过sudo composer self-update
,但是它不能正常工作,可能不是正确的方法. (?).我还能尝试做些什么?
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?
推荐答案
现在,在arch linux中有一个适用于composer的软件包,对我有用:
Now, there is a package for composer in arch linux which works for me:
sudo pacman -S composer
这篇关于/usr/local/bin/中的作曲者权限被拒绝的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!