Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.

GodziLaravel's avatar

Problems to run composer install

Hello

I try to run composer install but I got this error :

$ composer clear-cache

$ composer install
Installing dependencies from lock file (including require-dev)
Verifying lock file contents can be installed on current platform.
Package operations: 1 install, 0 updates, 0 removals
  - Downloading google/apiclient-services (v0.358.0)
  - Installing google/apiclient-services (v0.358.0): Extracting archive
    Install of google/apiclient-services failed

In Filesystem.php line 302:

  Could not delete /home/vagrant/code/irp-project/vendor/composer/tmp-d57972e6c3ee71eab9bf4f8e6eb0fa2
  d.zip:
install [--prefer-source] [--prefer-dist] [--prefer-install PREFER-INSTALL] [--dry-run] [--download-only] [--dev] [--no-suggest] [--no-dev] [--no-autoloader] [--no-progress] [--no-install] [--audit] [--audit-format AUDIT-FORMAT] [-v|vv|vvv|--verbose] [-o|--optimize-autoloader] [-a|--classmap-authoritative] [--apcu-autoloader] [--apcu-autoloader-prefix APCU-AUTOLOADER-PREFIX] [--ignore-platform-req IGNORE-PLATFORM-REQ] [--ignore-platform-reqs] [--] [<packages>...]

any Idea please ?

0 likes
8 replies
s4muel's avatar

delete everything in /home/vagrant/code/irp-project/vendor folder (with root in case of some missing permissions errors, sudo rm -rf /home/vagrant/code/irp-project/vendor/*) and run composer install again

GodziLaravel's avatar

@s4muel thanks

I did what you said and I deleted the directory but after composer install I got this again

 - Installing spatie/laravel-ignition (1.6.4): Extracting archive
 173/174 [===========================>]  99%    Install of google/apiclient-services failed

In Filesystem.php line 302:

  Could not delete /home/vagrant/code/irp-project/vendor/composer/tmp-342556f483cf077d78499f31e76f269
  5.zip:


install [--prefer-source] [--prefer-dist] [--prefer-install PREFER-INSTALL] [--dry-run] [--download-only] [--dev] [--no-suggest] [--no-dev] [--no-autoloader] [--no-progress] [--no-install] [--audit] [--audit-format AUDIT-FORMAT] [-v|vv|vvv|--verbose] [-o|--optimize-autoloader] [-a|--classmap-authoritative] [--apcu-autoloader] [--apcu-autoloader-prefix APCU-AUTOLOADER-PREFIX] [--ignore-platform-req IGNORE-PLATFORM-REQ] [--ignore-platform-reqs] [--] [<packages>...]

aleahy's avatar

@GodziLaravel Sounds like a permissions problem. Do the folders have the correct permissions?

GodziLaravel's avatar

Here the files project

drwxrwxrwx 1 vagrant vagrant  20480 Jun  6 12:58 ./
drwxrwxrwx 1 vagrant vagrant   8192 Apr 24 07:49 ../
drwxrwxrwx 1 vagrant vagrant  40960 May 31 11:44 app/
-rwxrwxrwx 1 vagrant vagrant   1739 Jul 27  2023 artisan*
drwxrwxrwx 1 vagrant vagrant      0 Jul 27  2023 bootstrap/
-rwxrwxrwx 1 vagrant vagrant   2664 Jun  6 09:36 composer.json*
-rwxrwxrwx 1 vagrant vagrant 459473 Jun  6 12:58 composer.lock*
drwxrwxrwx 1 vagrant vagrant   4096 Apr  9 14:52 config/
drwxrwxrwx 1 vagrant vagrant      0 Jul 27  2023 database/
drwxrwxrwx 1 vagrant vagrant      0 Apr 25 08:32 .docker/
-rwxrwxrwx 1 vagrant vagrant   1747 Apr 24 12:20 docker-compose.yml*
-rwxrwxrwx 1 vagrant vagrant    228 Jul 27  2023 .editorconfig*
-rwxrwxrwx 1 vagrant vagrant   4636 Apr 10 13:03 .env*
-rwxrwxrwx 1 vagrant vagrant    770 Jul 27  2023 .env.example*
drwxrwxrwx 1 vagrant vagrant   4096 Jun  6 09:36 .git/
-rwxrwxrwx 1 vagrant vagrant    116 Jul 27  2023 .gitattributes*
-rwxrwxrwx 1 vagrant vagrant    583 May 14 06:42 .gitignore*
drwxrwxrwx 1 vagrant vagrant   4096 Jun  6 11:34 .idea/
-rwxrwxrwx 1 vagrant vagrant 179887 Nov 19  2021 _ide_helper_models.php*
drwxrwxrwx 1 vagrant vagrant 163840 Aug 22  2023 node_modules/
-rwxrwxrwx 1 vagrant vagrant   2896 Nov 15  2023 package.json*
-rwxrwxrwx 1 vagrant vagrant 878530 May  2 13:05 package-lock.json*
-rwxrwxrwx 1 vagrant vagrant      0 Jul 27  2023 php*
-rwxrwxrwx 1 vagrant vagrant    310 Oct 26  2021 phpstan.neon*
-rwxrwxrwx 1 vagrant vagrant   1189 Jul 27  2023 phpunit.xml*
drwxrwxrwx 1 vagrant vagrant  20480 Jan  4 15:12 public/
drwxrwxrwx 1 vagrant vagrant      0 Nov 26  2021 resources/
drwxrwxrwx 1 vagrant vagrant      0 May 28 08:37 routes/
-rwxrwxrwx 1 vagrant vagrant    584 Jul 27  2023 server.php*
-rwxrwxrwx 1 vagrant vagrant    510 Jul 27  2023 sh.exe.stackdump*
drwxrwxrwx 1 vagrant vagrant      0 Apr  5  2023 storage/
-rwxrwxrwx 1 vagrant vagrant    187 Jul 27  2023 .styleci.yml*
drwxrwxrwx 1 vagrant vagrant      0 May  2 13:05 tests/
-rwxrwxrwx 1 vagrant vagrant      0 Jul 27  2023 .user.ini*
drwxrwxrwx 1 vagrant vagrant   8192 Jun  6 12:58 vendor/
drwxrwxrwx 1 vagrant vagrant      0 Nov 15  2023 .vscode/
-rwxrwxrwx 1 vagrant vagrant    976 Nov 15  2023 webpack.mix.js*
-rwxrwxrwx 1 vagrant vagrant 436076 May  2 13:05 yarn.lock*


aleahy's avatar

Are you running as vagrant user?

Please or to participate in this conversation.