Composer php 由于composer权限问题,Symfony无法安装新捆绑包

Composer php 由于composer权限问题,Symfony无法安装新捆绑包,composer-php,symfony-3.4,Composer Php,Symfony 3.4,在尝试将新捆绑包安装到我的project composer中时,出现了与权限有关的问题,问题如下 Script Sensio\Bundle\DistributionBundle\Composer\ScriptHandler::installRequirementsFile handling the symfony-scripts event terminated with an exception Installation failed, reverting ./composer.json t

在尝试将新捆绑包安装到我的project composer中时,出现了与权限有关的问题,问题如下

Script Sensio\Bundle\DistributionBundle\Composer\ScriptHandler::installRequirementsFile handling the symfony-scripts event terminated with an exception

Installation failed, reverting ./composer.json to its original content.


[Symfony\Component\Filesystem\Exception\IOException]                                                                                                                 
Failed to copy "/var/www/html/myProject/vendor/sensio/distribution-bundle/Composer/../Resources/skeleton/app/check.php" to "bin/symfony_requirements" because target file could not be opened for writing.                                                                                                                                    

谢谢你

您对文件
bin/symfony\u要求的权限错误
。修好它,一切都会像符咒一样发挥作用。这可能会帮助你:

sudo chmod -R 777 bin/symfony_requirements
检查其他目录和文件是否需要权限,例如在我的情况下:

sudo chown-R$USER web/

这也是需要的

此外,如果缓存和日志有问题,您可能会发现以下内容很有用:

 rm -rf var/logs
 rm -rf var/cache
 rm -rf vendor

然后使用
composer安装

您试图调试该问题的原因是什么?目标文件是否已经存在?您是否检查了其文件夹的权限?