我正在尝试将 非常好安装到 Ubuntu 16.04服务器上,但这会导致一个错误:
$ composer global require "hirak/prestissimo:^0.3"
Changed current directory to /home/kramer65/.composer
[ErrorException]
file_put_contents(./composer.json): failed to open stream: Permission denied
require [--dev] [--prefer-source] [--prefer-dist] [--no-progress] [--no-update] [--no-scripts] [--update-no-dev] [--update-with-dependencies] [--ignore-platform-reqs] [--prefer-stable] [--prefer-lowest] [--sort-packages] [-o|--optimize-autoloader] [-a|--classmap-authoritative] [--] [<packages>]...
我以用户 kramer65
登录,所以我不知道为什么它不能写到我的主文件夹。我对 permission denied
的正常反应是使用 sudo
,但是作曲家总是说:
不要以 root/super 用户身份运行 Composer! 请参阅 https://getcomposer.org/root了解详细信息
Any idea how I can solve this?