当尝试将新的包安装到我的项目 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.
谢谢...
最佳答案
这可能对你有帮助:
sudo chmod -R 777 bin/symfony_requirements
检查其他目录和文件是否需要权限,例如在我的情况下:
sudo chown -R $USER web/
也需要。
此外,如果您遇到缓存和日志方面的问题,您可能会发现以下内容很有用:
rm -rf var/logs
rm -rf var/cache
rm -rf vendor
然后使用composer install
关于composer-php - 由于 composer 权限问题,Symfony 无法安装新包,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/48576232/