/usr/local/bin/中作曲家的权限被拒绝

permission denied for composer in /usr/local/bin/(/usr/local/bin/中作曲家的权限被拒绝)
本文介绍了/usr/local/bin/中作曲家的权限被拒绝的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我遵循了 https://getcomposer.org/doc/00-intro.md#globally 上的文档 在 Arch linux 上全局安装 composer.当我执行 composer self-update 时,我会收到以下消息:

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 看起来是这样的:

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/

我也试过 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/中作曲家的权限被拒绝的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持编程学习网!

本站部分内容来源互联网,如果有图片或者内容侵犯您的权益请联系我们删除!

相关文档推荐

Convert JSON integers and floats to strings(将JSON整数和浮点数转换为字符串)
in php how do I use preg replace to turn a url into a tinyurl(在php中,如何使用preg替换将URL转换为TinyURL)
all day appointment for ics calendar file wont work(ICS日历文件的全天约会不起作用)
trim function is giving unexpected values php(Trim函数提供了意外的值php)
Basic PDO connection to MySQL(到MySQL的基本PDO连接)
PHP number_format returns 1.00(Php number_Format返回1.00)