google-api-php-client: Composer install/update: Could not delete ....
Hey there,
everytime we running composer update
or composer install
we have to remove the folder by hand. Anybody got an idea what the problem is?
Environment details
- OS:
- Host: Windows 10
- Docker-Container: Alpine
- PHP version: 7.1.14
- Package name and version: google/apiclient-services v0.102
Steps to reproduce
composer install
orcomposer update
Code example
- Updating google/apiclient-services (v0.101 => v0.102):
Update failed (Could not delete /vendor/google/apiclient-services/src/Google/Service/Compute: )
Would you like to try reinstalling the package instead [yes]? yes
- Removing google/apiclient-services (v0.101)
[RuntimeException] Could not delete /vendor/google/apiclient-services/src/Google/Service/Compute:
Thanks!
About this issue
- Original URL
- State: closed
- Created 5 years ago
- Reactions: 8
- Comments: 16 (3 by maintainers)
I had the same issue. Weirdly, it seemed like related to permissions.
Try doing this.
chmod -R 777 vendor
And, then run
composer install
orcomposer update
I guess by default vendor has 777 permission, but still, welcome to world of PHP! 😕
Thank you. The following helped me
COMPOSER_PROCESS_TIMEOUT=2000 composer install
Even though this issue has been closed, I’d thought I’d contribute.
I ran into the same issue and when I went looking for the problem I’d noticed that the PHP version set in composer.json (PHP 7.2) did not match the PHP version that was actually installed (7.4). I was able to fix it by simply setting the PHP version to the actual version and re-running require command.
Hope this helps.
I’m going to close this issue out. If you’re still having trouble, please feel free to re-open! Hopefully the solution suggested by @UnnitMetaliya works for everybody. 😃
[RuntimeException] Could not delete C:\xampp\htdocs\project\new-project/vendor/composer/a37b3b46\thephpleague-oauth1-client-1e7e6be\re sources\examples\tumblr.php: This can be due to an antivirus or the Windows Search Indexer locking the file while they are analyzed
temporary solution
chmod: cambiando los permisos de ‘vendor/EVERY-PACKAGE-ANME’: Permission denied