将symfony项目克隆到工作区后,我使用composer install
来获取项目的vendor
文件夹。我用Laravel Homestead作为我的工作环境。然后它给了我下面的错误。
Loading composer repositories with package information
Installing dependencies (including require-dev) from lock file
Package operations: 89 installs, 0 updates, 0 removals
- Installing ocramius/package-versions (1.4.0): Loading from cache
Plugin installation failed, rolling back
- Removing ocramius/package-versions (1.4.0)
[RuntimeException]
Could not delete /home/vagrant/code/oensys/project_test/server_side/vendor/ocramius/package-versions/src/PackageVersions:
然后我在清除缓存(通过使用rm -rf ~/.composer/cache
命令(并删除之前创建的供应商文件夹后尝试做同样的事情,然后它给了我同样的错误。
如果有人能帮助我解决这个问题,我真的很感激。
尝试运行composer install --no-plugins
有关其他解决方案,请参阅 https://github.com/laravel/homestead/issues/1240。
要解决此问题,请按照以下步骤操作:
composer install --no-plugins --no-scripts
composer install