PHP警告:file_put_contents(/home/username/.composer/keys.dev.pub):无法打开流:权限被拒绝 - 在线466
问题描述:
我需要安装我的sh文件。PHP警告:file_put_contents(/home/username/.composer/keys.dev.pub):无法打开流:权限被拒绝 - 在线466
我的SH文件:
#!/bin/bash
HTTPDUSER=`ps aux | grep -E '[a]pache|[h]ttpd|[_]www|[w]ww-data|[n]ginx' | grep -v root | head -1 | cut -d\ -f1`
setfacl -R -m u:"$HTTPDUSER":rwX -m u:`whoami`:rwX app/cache app/logs web/assets/logos
setfacl -dR -m u:"$HTTPDUSER":rwX -m u:`whoami`:rwX app/cache app/logs web/assets/logos
npm install
curl -sS https://getcomposer.org/installer | php
php composer.phar install
rm composer.phar
php app/console cache:clear --env=dev
php app/console cache:clear --env=prod
php app/console doctrine:database:drop --force
php app/console doctrine:database:create
php app/console doctrine:migrations:migrate --no-interaction
NODE_ENV=production node_modules/.bin/webpack
php app/console assetic:dump --env=prod --no-debug
php app/console assets:install --symlink web
当SH文件步骤:
curl -sS https://getcomposer.org/installer | php
则显示错误:
All settings correct for using Composer
PHP Warning: file_put_contents(/home/ruslan/.composer/keys.dev.pub): failed to open stream: Permission denied in - on line 466
PHP Warning: file_put_contents(/home/ruslan/.composer/keys.tags.pub): failed to open stream: Permission denied in - on line 483
我不知道我的卷曲或发生作曲家。请帮帮我。
答
尝试删除个人文件夹作曲家目录,然后重新安装:
rm $HOME/.composer -r
curl -s https://getcomposer.org/installer | php
php composer.phar install
下一个步骤:下载1.1.3 ... 作曲家成功安装到:在/ var/www/html等/ PROJECT_NAME /作曲家.phar 使用它:php composer.phar 使用软件包信息加载composer存储库 从锁定文件安装依赖项(包括require-dev) 您的需求无法解析为一组可安装的软件包。 –
问题1 - jms/security-extra-bundle 1.5.x-dev的安装请求 - > jms/security-extra-bundle [1.5.x-dev]可以满足。 - jms/security-extra-bundle 1.5.x-dev需要php〜5.3 - >你的PHP版本(7.0.8)不能满足这个要求。 –
问题2 - jms/security-extra-bundle dev-master需要php〜5.3 - >您的PHP版本(7.0.8)不符合该要求。 - jms/security-extra-bundle dev-master需要php〜5.3 - >你的PHP版本(7.0.8)不符合这个要求。 - jms/security-extra-bundle dev-master的安装请求 - >通过jms/security-extra-bundle [dev-master]可以满足。 –