composer / package-versions-deprecated

:package: Composer addon to efficiently get installed packages' version numbers
MIT License
1.51k stars 9 forks source link

Could not delete /home/vagrant/.../vendor/composer/package-versions-deprecated/src #21

Closed amacsmith closed 3 years ago

amacsmith commented 3 years ago

I am running into this issue attempting to upgrade to composer version 2. In a Laravel\Homestead vagrant box on Windows 10 with Virtual box.

PHP version: 7.2

composer.json:

{
    "name": "laravel/laravel",
    "description": "The Laravel Framework.",
    "keywords": [
        "framework",
        "laravel"
    ],
    "license": "MIT",
    "type": "project",
    "require": {
        "php": "^7.2",
        "ext-json": "*",
        "arcanedev/log-viewer": "^5.1",
        "asvae/laravel-api-tester": "^2.0",
        "aws/aws-sdk-php": "^3.101",
        "bepsvpt/secure-headers": "^5.3",
        "beyondcode/laravel-websockets": "^1.8",
        "doctrine/annotations": "^1.6",
        "doctrine/couchdb": "^1.0@beta",
        "doctrine/dbal": "^2.7",
        "fideloper/proxy": "^4.0",
        "firebase/php-jwt": "^5.0",
        "gluedev/laravel-stackdriver": "^0.1.2",
        "google/cloud": "^0.96.0",
        "google/protobuf": "^3.8",
        "graylog2/gelf-php": "^1.6",
        "hoa/console": "^3.17",
        "ircmaxell/random-lib": "^1.2",
        "kitetail/zttp": "^0.6.0",
        "ktamas77/firebase-php": "^2.2",
        "langleyfoxall/laravel-nist-password-rules": "^4.1",
        "laravel/framework": "6.18.22",
        "laravel/passport": "^9.3",
        "laravel/tinker": "^2.0",
        "laravel-notification-channels/twilio": "^3.1",
        "league/csv": "^9.1",
        "league/flysystem-aws-s3-v3": "^1.0",
        "league/flysystem-azure-blob-storage": "^0.1.6",
        "league/flysystem-cached-adapter": "^1.0",
        "league/flysystem-rackspace": "^1.0",
        "league/flysystem-sftp": "^1.0",
        "league/flysystem-webdav": "^1.0",
        "league/flysystem-ziparchive": "^1.0",
        "mockery/mockery": "^1.0",
        "mollie/polyfill-libsodium": "^1.1",
        "nexmo/client": "^1.8",
        "nyholm/psr7": "^1.1",
        "opencensus/opencensus-exporter-stackdriver": "~0.1",
        "pda/pheanstalk": "^4.0",
        "php-amqplib/php-amqplib": "^2.9",
        "php-console/php-console": "^3.1",
        "phpseclib/mcrypt_compat": "^1.0",
        "phpunit/php-invoker": "^2.0",
        "predis/predis": "^1.1",
        "propaganistas/laravel-intl": "^3.0",
        "propaganistas/laravel-phone": "^4.2",
        "psr/event-dispatcher": "^1.0",
        "ramsey/uuid-doctrine": "^1.5",
        "rbdwllr/reallysimplejwt": "^2.0.42",
        "rollbar/rollbar": "^1.8",
        "ruflin/elastica": "^6.1",
        "spatie/flysystem-dropbox": "^1.1",
        "spatie/laravel-fractal": "^5.6",
        "spatie/laravel-permission": "^3.6",
        "symfony/browser-kit": "^4.3",
        "symfony/config": "^4.3",
        "symfony/dependency-injection": "^4.3",
        "symfony/dom-crawler": "^4.3",
        "symfony/expression-language": "^4.3",
        "symfony/lock": "^4.3",
        "symfony/translation": "4.3.8",
        "symfony/yaml": "^4.3",
        "titasgailius/search-relations": "^1.0",
        "true/punycode": "^2.1",
        "twilio/sdk": "^6.10",
        "unicodeveloper/laravel-password": "1.0.*",
        "voiceit-php/voiceit2": "^3.0",
        "whoops/soap": "^1.0",
        "wildbit/swiftmailer-postmark": "^3.0"
    },
    "require-dev": {
        "barryvdh/laravel-debugbar": "^3.3",
        "beyondcode/laravel-er-diagram-generator": "^0.2.2",
        "coderello/laravel-populated-factory": "^0.3.0",
        "facade/ignition": "^1.16",
        "fzaninotto/faker": "^1.4",
        "mockery/mockery": "^1.0",
        "nunomaduro/collision": "^3.0",
        "phpunit/phpunit": "^8.0",
        "squizlabs/php_codesniffer": "^3.3"
    },
    "autoload": {
        "classmap": [
            "database/seeds",
            "database/factories"
        ],
        "psr-4": {
            "App\\": "app/"
        }
    },
    "autoload-dev": {
        "psr-4": {
            "Tests\\": "tests/"
        }
    },
    "extra": {
        "laravel": {
            "dont-discover": []
        }
    },
    "scripts": {
        "post-root-package-install": [
            "@php -r \"file_exists('.env') || copy('.env.example', '.env');\""
        ],
        "post-create-project-cmd": [
            "@php artisan key:generate"
        ],
        "post-autoload-dump": [
            "Illuminate\\Foundation\\ComposerScripts::postAutoloadDump",
            "@php artisan package:discover"
        ]
    },
    "config": {
        "preferred-install": "dist",
        "sort-packages": true,
        "optimize-autoloader": true
    },
    "minimum-stability": "dev",
    "prefer-stable": true
}

and I get this as an output:

Executing command (CWD): rm -rf '/home/vagrant/<myAppDirectory>/vendor/wildbit/swiftmailer-postmark'                                                          
Downloading https://packagist.org/downloads/                                                                                                           
[201] https://packagist.org/downloads/                                                                                                                 

  [RuntimeException]                                                                                                                                   
  Could not delete /home/vagrant/<myAppDirectory>/vendor/composer/package-versions-deprecated/src:                                                            

Exception trace:                                                                                                                                       
 () at phar:///usr/local/bin/composer/src/Composer/Util/Filesystem.php:218                                                                             
 Composer\Util\Filesystem->unlink() at phar:///usr/local/bin/composer/src/Composer/Util/Filesystem.php:171                                             
 Composer\Util\Filesystem->removeDirectoryPhp() at phar:///usr/local/bin/composer/src/Composer/Util/Filesystem.php:138                                 
 Composer\Util\Filesystem->removeDirectory() at phar:///usr/local/bin/composer/src/Composer/Downloader/FileDownloader.php:378                          
 Composer\Downloader\FileDownloader->remove() at phar:///usr/local/bin/composer/src/Composer/Downloader/DownloadManager.php:349                        
 Composer\Downloader\DownloadManager->remove() at phar:///usr/local/bin/composer/src/Composer/Installer/LibraryInstaller.php:299                       
 Composer\Installer\LibraryInstaller->removeCode() at phar:///usr/local/bin/composer/src/Composer/Installer/LibraryInstaller.php:189                   
 Composer\Installer\LibraryInstaller->uninstall() at phar:///usr/local/bin/composer/src/Composer/Installer/PluginInstaller.php:121                     
 Composer\Installer\PluginInstaller->rollbackInstall() at phar:///usr/local/bin/composer/src/Composer/Installer/PluginInstaller.php:79                 
 Composer\Installer\PluginInstaller->Composer\Installer\{closure}() at n/a:n/a                                                                         
 call_user_func() at phar:///usr/local/bin/composer/vendor/react/promise/src/React/Promise/FulfilledPromise.php:20                                     
 React\Promise\FulfilledPromise->then() at phar:///usr/local/bin/composer/vendor/react/promise/src/React/Promise/Deferred.php:74                       
 React\Promise\Deferred->React\Promise\{closure}() at n/a:n/a                                                                                          
 call_user_func() at phar:///usr/local/bin/composer/vendor/react/promise/src/React/Promise/Deferred.php:166                                            
 React\Promise\Deferred->processQueue() at phar:///usr/local/bin/composer/vendor/react/promise/src/React/Promise/Deferred.php:95                       
 React\Promise\Deferred->resolve() at n/a:n/a                                                                                                          
 call_user_func() at phar:///usr/local/bin/composer/vendor/react/promise/src/React/Promise/FulfilledPromise.php:20                                     
 React\Promise\FulfilledPromise->then() at phar:///usr/local/bin/composer/vendor/react/promise/src/React/Promise/Deferred.php:78                       
 React\Promise\Deferred->React\Promise\{closure}() at n/a:n/a                                                                                          
 call_user_func() at phar:///usr/local/bin/composer/vendor/react/promise/src/React/Promise/Deferred.php:166                                            
 React\Promise\Deferred->processQueue() at phar:///usr/local/bin/composer/vendor/react/promise/src/React/Promise/Deferred.php:95                       
 React\Promise\Deferred->resolve() at n/a:n/a                                                                                                          
 call_user_func() at phar:///usr/local/bin/composer/vendor/react/promise/src/React/Promise/FulfilledPromise.php:20                                     
 React\Promise\FulfilledPromise->then() at phar:///usr/local/bin/composer/vendor/react/promise/src/React/Promise/Deferred.php:78                       
 React\Promise\Deferred->React\Promise\{closure}() at n/a:n/a                                                                                          
 call_user_func() at phar:///usr/local/bin/composer/vendor/react/promise/src/React/Promise/Deferred.php:166                                            
 React\Promise\Deferred->processQueue() at phar:///usr/local/bin/composer/vendor/react/promise/src/React/Promise/Deferred.php:95                       
 React\Promise\Deferred->resolve() at n/a:n/a                                                                                                          
 call_user_func() at phar:///usr/local/bin/composer/vendor/react/promise/src/React/Promise/FulfilledPromise.php:20                                     
 React\Promise\FulfilledPromise->then() at phar:///usr/local/bin/composer/vendor/react/promise/src/React/Promise/Deferred.php:78                       
 React\Promise\Deferred->React\Promise\{closure}() at n/a:n/a                                                                                          
 call_user_func() at phar:///usr/local/bin/composer/vendor/react/promise/src/React/Promise/Deferred.php:166                                            
 React\Promise\Deferred->processQueue() at phar:///usr/local/bin/composer/vendor/react/promise/src/React/Promise/Deferred.php:95                       
 React\Promise\Deferred->resolve() at n/a:n/a                                                                                                          
 call_user_func() at phar:///usr/local/bin/composer/vendor/react/promise/src/React/Promise/FulfilledPromise.php:20                                     
 React\Promise\FulfilledPromise->then() at phar:///usr/local/bin/composer/vendor/react/promise/src/React/Promise/Deferred.php:78                       
 React\Promise\Deferred->React\Promise\{closure}() at n/a:n/a                                                                                          
 call_user_func() at phar:///usr/local/bin/composer/vendor/react/promise/src/React/Promise/Deferred.php:166                                            
 React\Promise\Deferred->processQueue() at phar:///usr/local/bin/composer/vendor/react/promise/src/React/Promise/Deferred.php:95                       
 React\Promise\Deferred->resolve() at phar:///usr/local/bin/composer/vendor/react/promise/src/React/Promise/Promise.php:42                             
 React\Promise\Promise->React\Promise\{closure}() at n/a:n/a                                                                                           
 call_user_func() at phar:///usr/local/bin/composer/src/Composer/Util/ProcessExecutor.php:284                                                          
 Composer\Util\ProcessExecutor->countActiveJobs() at phar:///usr/local/bin/composer/src/Composer/Util/Loop.php:95                                      
 Composer\Util\Loop->wait() at phar:///usr/local/bin/composer/src/Composer/Installer/InstallationManager.php:454                                       
 Composer\Installer\InstallationManager->waitOnPromises() at phar:///usr/local/bin/composer/src/Composer/Installer/InstallationManager.php:440         
 Composer\Installer\InstallationManager->executeBatch() at phar:///usr/local/bin/composer/src/Composer/Installer/InstallationManager.php:367           
 Composer\Installer\InstallationManager->downloadAndExecuteBatch() at phar:///usr/local/bin/composer/src/Composer/Installer/InstallationManager.php:266
 Composer\Installer\InstallationManager->execute() at phar:///usr/local/bin/composer/src/Composer/Installer.php:696                                    
 Composer\Installer->doInstall() at phar:///usr/local/bin/composer/src/Composer/Installer.php:533                                                      
 Composer\Installer->doUpdate() at phar:///usr/local/bin/composer/src/Composer/Installer.php:245                                                       
 Composer\Installer->run() at phar:///usr/local/bin/composer/src/Composer/Command/UpdateCommand.php:231                                                
 Composer\Command\UpdateCommand->execute() at phar:///usr/local/bin/composer/vendor/symfony/console/Command/Command.php:245                            
 Symfony\Component\Console\Command\Command->run() at phar:///usr/local/bin/composer/vendor/symfony/console/Application.php:835                         
 Symfony\Component\Console\Application->doRunCommand() at phar:///usr/local/bin/composer/vendor/symfony/console/Application.php:185                    
 Symfony\Component\Console\Application->doRun() at phar:///usr/local/bin/composer/src/Composer/Console/Application.php:310                             
 Composer\Console\Application->doRun() at phar:///usr/local/bin/composer/vendor/symfony/console/Application.php:117                                    
 Symfony\Component\Console\Application->run() at phar:///usr/local/bin/composer/src/Composer/Console/Application.php:122                               
 Composer\Console\Application->run() at phar:///usr/local/bin/composer/bin/composer:63                                                                 
 require() at /usr/local/bin/composer:24    

I am not sure how to fix it. I can get around it by running composer --no-plugins. However, I am not sure that I actually want to do that.

Any help would be much appreciated.

-- Thanks

eduardonoso commented 3 years ago

I am also encountering this same issue with installing this package in a Laravel/Vagrant environment using Composer 2.0.8 and php 7.3.

amacsmith commented 3 years ago

I am also encountering this same issue with installing this package in a Laravel/Vagrant environment using Composer 2.0.8 and php 7.3.

@eduardosunrise Could you describe how this issue came about for you? I am just trying to compare what I may have done as well to see if we took similar steps to creating this.

amacsmith commented 3 years ago

This is becoming a real issue for me. I have completely uninstalled composer and reinstalled and this issue still persists. Prior to upgrading to composer v2 everything was working as normal. Some insight would be really helpful. Thanks in advanced.

eduardonoso commented 3 years ago

I am also encountering this same issue with installing this package in a Laravel/Vagrant environment using Composer 2.0.8 and php 7.3.

@eduardosunrise Could you describe how this issue came about for you? I am just trying to compare what I may have done as well to see if we took similar steps to creating this.

Nothing changed on our package.json, just trying to onboard a new contributor and they are unable to run composer install. The only way we could get around it was to run it with the --no-plugins option. I believe it may have to do either with the v1.11.99.1 release of this package or Composer 2.0.8 as all other users are running Composer 2.0.7 and v1.11.99 of this package. The unfortunate part is I am unable to require v1.11.99 as it's not found so the new user is unable to force the downgraded version.

amacsmith commented 3 years ago

Interesting that sounds exactly what I ran into. I as well had to run the --no-plugins option. I am just afraid one of environments may run into this during a deployment. I also downgraded virtual box, reinstalled vagrant, bumped composer down to version 1, changed php cli versions all around. However, all cases I am running into this issue still.

Seldaek commented 3 years ago

This is a virtualbox filesystem bug as far as I can tell.

amacsmith commented 3 years ago

That is strange because this was working prior to me upgrading to composer v2. Can you explain why it is you think it is related to virtualbox filesystem? I say this because I have reinstalled VirtualBox and downgraded it to versions I know to be once working.

Seldaek commented 3 years ago

Possibly because Composer 2 runs unzips in parallel, or possibly because it just does different things post-install than v1 did. I am not entirely sure. It'd be great to get a full composer update -vvv output. Perhaps that'd highlight something.

Seldaek commented 3 years ago

The point is tho that I have not seen anyone able to repro this outside virtualbox..

amacsmith commented 3 years ago

I understand, I am just trying to gather enough information so that if it does relate to virtual box I know what to ask and in the right way. Here is the debugging of the composer install command inside of the virtualbox/vagrant box laravel/homestead...

Reading ./composer.json
Loading config file /home/vagrant/.config/composer/config.json
Loading config file /home/vagrant/.config/composer/auth.json
Loading config file ./composer.json
Checked CA file /etc/ssl/certs/ca-certificates.crt: valid
Executing command (/home/vagrant/medsitter): git branch -a --no-color --no-abbrev -v
Reading /home/vagrant/.config/composer/composer.json
Loading config file /home/vagrant/.config/composer/config.json
Loading config file /home/vagrant/.config/composer/auth.json
Loading config file /home/vagrant/.config/composer/composer.json
Loading config file /home/vagrant/.config/composer/auth.json
Reading /home/vagrant/.config/composer/auth.json
Reading /home/vagrant/.config/composer/vendor/composer/installed.json
Loading plugin Slince\Crm\RepositoryManager
Running 1.10.19 (2020-12-04 09:14:16) with PHP 7.2.34-8+ubuntu18.04.1+deb.sury.org+1 on Linux / 4.15.0-124-generic
Reading ./composer.lock
Loading composer repositories with package information
Installing dependencies (including require-dev) from lock file
Reading ./composer.lock
Resolving dependencies through SAT
Looking at all rules.

Dependency resolution completed in 0.002 seconds
Analyzed 343 packages to resolve dependencies
Analyzed 1114 rules to resolve dependencies
Package operations: 258 installs, 0 updates, 0 removals
Installs: composer/package-versions-deprecated:1.8.0, psr/log:1.1.3, symfony/polyfill-ctype:v1.20.0, phpoption/phpoption:1.7.5, vlucas/phpdotenv:v3.6.7, symfony/css-selector:v5.1.7, tijsverkoyen/css-to-inline-styles:2.2.3, symfony/polyfill-php80:v1.20.0, symfony/polyfill-php72:v1.20.0, symfony/polyfill-mbstring:v1.20.0, symfony/var-dumper:v4.4.15, symfony/routing:v4.4.15, symfony/process:v4.4.15, symfony/polyfill-php73:v1.20.0, symfony/polyfill-intl-normalizer:v1.20.0, symfony/polyfill-intl-idn:v1.20.0, symfony/mime:v5.1.7, symfony/http-foundation:v4.4.15, symfony/http-client-contracts:v2.3.1, symfony/event-dispatcher-contracts:v1.1.9, symfony/event-dispatcher:v4.4.15, symfony/debug:v4.4.15, symfony/error-handler:v4.4.15, symfony/http-kernel:v4.4.15, symfony/finder:v4.4.15, psr/container:1.0.0, symfony/service-contracts:v2.2.0, symfony/console:v4.4.15, symfony/polyfill-iconv:v1.20.0, doctrine/lexer:1.2.1, egulias/email-validator:2.1.22, swiftmailer/swiftmailer:v6.2.3, paragonie/random_compat:v9.99.99, ramsey/uuid:3.9.3, psr/simple-cache:1.0.1, opis/closure:3.6.0, symfony/translation-contracts:v1.1.10, symfony/translation:v4.3.8, nesbot/carbon:2.41.5, monolog/monolog:1.25.5, league/mime-type-detection:1.5.1, league/flysystem:1.1.3, league/commonmark:1.5.6, dragonmantank/cron-expression:v2.3.1, doctrine/inflector:2.0.3, laravel/framework:v6.18.22, arcanedev/support:5.2.0, arcanedev/log-viewer:5.2.0, asvae/laravel-api-tester:2.0.11, bepsvpt/secure-headers:5.6.0, psr/http-message:1.0.1, symfony/psr-http-message-bridge:v2.0.2, ringcentral/psr7:1.3.0, react/event-loop:v1.1.1, evenement/evenement:v3.0.1, react/stream:v1.1.1, react/promise:v2.8.0, react/promise-timer:v1.6.0, react/cache:v1.1.0, react/dns:v1.4.0, react/socket:v1.6.0, react/promise-stream:v1.2.0, react/http:v1.1.0, paragonie/sodium_compat:v1.13.0, pusher/pusher-php-server:v3.4.1, ralouphie/getallheaders:3.0.3, guzzlehttp/psr7:1.7.0, facade/ignition-contracts:1.0.1, ratchet/rfc6455:v0.3, cboden/ratchet:v0.4.3, beyondcode/laravel-websockets:1.9.0, psr/cache:1.0.1, cache/tag-interop:1.0.0, cache/adapter-common:1.1.0, divineomega/do-file-cache:v2.0.6, psr/http-factory:1.0.1, php-http/message-factory:v1.0.2, nyholm/psr7:1.3.1, laminas/laminas-zendframework-bridge:1.1.1, laminas/laminas-diactoros:2.4.1, psr/http-client:1.0.1, php-http/discovery:1.12.0, paragonie/constant_time_encoding:v2.3.0, guzzlehttp/promises:1.4.0, guzzlehttp/guzzle:6.5.5, paragonie/certainty:v2.8.0, divineomega/psr-18-guzzle-adapter:v1.1.0, divineomega/do-file-cache-psr-6:v2.0.1, divineomega/password_exposed:v3.1.1, doctrine/event-manager:1.1.1, doctrine/collections:1.6.7, doctrine/cache:1.10.2, doctrine/annotations:1.11.0, doctrine/persistence:2.1.0, doctrine/common:3.0.2, doctrine/couchdb:1.0.0-beta4, fideloper/proxy:4.4.1, giggsey/locale:1.9, opencensus/opencensus:v0.5.2, rize/uri-template:0.3.2, grpc/grpc:1.30.0, google/protobuf:v3.13.0.1, firebase/php-jwt:v5.2.0, google/auth:v1.14.3, google/grpc-gcp:0.1.5, google/common-protos:0.1.0, google/gax:0.38.2, google/cloud:v0.96.0, opencensus/opencensus-exporter-stackdriver:v0.1.0, gluedev/laravel-stackdriver:0.1.2, graham-campbell/guzzle-factory:v3.0.4, graylog2/gelf-php:1.6.5, guzzlehttp/streams:3.0.0, guzzlehttp/ringphp:1.1.1, hoa/exception:1.17.01.16, hoa/consistency:1.17.05.02, hoa/event:1.17.01.13, hoa/ustring:4.17.01.16, hoa/protocol:1.17.01.14, hoa/stream:1.17.02.21, hoa/iterator:2.17.01.10, hoa/file:1.17.07.11, hoa/console:3.17.05.02, ircmaxell/security-lib:v1.1.0, ircmaxell/random-lib:v1.2.0, tightenco/collect:v5.8.38, kitetail/zttp:v0.6.0, ktamas77/firebase-php:2.2.2, divineomega/laravel-password-exposed-validation-rule:v2.3.0, langleyfoxall/laravel-nist-password-rules:v4.3.0, twilio/sdk:6.11.0, laravel-notification-channels/twilio:3.1.2, phpseclib/phpseclib:2.0.29, league/event:2.2.0, lcobucci/jwt:3.3.3, defuse/php-encryption:v2.2.1, league/oauth2-server:8.1.1, laravel/passport:v9.3.1, nikic/php-parser:v4.10.2, dnoegel/php-xdg-base-dir:v0.1.1, psy/psysh:v0.10.4, laravel/tinker:v2.4.2, league/csv:9.6.1, mtdowling/jmespath.php:2.6.0, aws/aws-sdk-php:3.158.13, league/flysystem-aws-s3-v3:1.0.29, microsoft/azure-storage-common:1.5.0, microsoft/azure-storage-blob:1.5.1, league/flysystem-azure-blob-storage:0.1.6, league/flysystem-cached-adapter:1.1.0, mikemccabe/json-patch-php:0.1.0, guzzle/guzzle:v3.8.1, rackspace/php-opencloud:v1.16.0, league/flysystem-rackspace:1.0.5, league/flysystem-sftp:1.0.22, sabre/uri:2.2.1, sabre/xml:2.2.3, sabre/vobject:4.3.2, sabre/event:5.1.2, sabre/http:5.1.1, sabre/dav:4.1.2, league/flysystem-webdav:1.0.9, league/flysystem-ziparchive:1.0.3, league/fractal:0.19.2, hamcrest/hamcrest-php:v2.0.1, mockery/mockery:1.3.3, mollie/polyfill-libsodium:v1.1.1, php-http/promise:1.1.0, php-http/httplug:v1.1.0, php-http/guzzle6-adapter:v1.1.1, nexmo/client-core:1.8.1, nexmo/client:1.9.1, pda/pheanstalk:v4.0.3, php-amqplib/php-amqplib:v2.12.1, php-console/php-console:3.1.8, phpseclib/mcrypt_compat:1.0.11, phpunit/php-invoker:2.0.0, predis/predis:v1.1.6, umpirsky/locale-list:1.0.0, umpirsky/country-list:2.0.5, punic/punic:3.5.1, commerceguys/intl:v1.0.7, propaganistas/laravel-intl:3.1.0, league/iso3166:2.1.5, giggsey/libphonenumber-for-php:8.12.11, propaganistas/laravel-phone:4.2.6, psr/event-dispatcher:1.0.0, doctrine/instantiator:1.3.1, doctrine/dbal:2.10.4, doctrine/orm:2.8.x-dev 4bfc84f, ramsey/uuid-doctrine:1.6.0, rbdwllr/reallysimplejwt:2.1.0, rollbar/rollbar:v1.8.1, elasticsearch/elasticsearch:v6.7.2, ruflin/elastica:6.1.1, spatie/dropbox-api:1.16.0, spatie/flysystem-dropbox:1.2.2, spatie/fractalistic:2.9.0, spatie/laravel-fractal:5.8.0, spatie/laravel-permission:3.17.0, symfony/dom-crawler:v4.4.15, symfony/browser-kit:v4.4.15, symfony/cache-contracts:v2.2.0, symfony/filesystem:v5.1.7, symfony/config:v4.4.15, symfony/dependency-injection:v4.4.15, symfony/var-exporter:v5.1.7, symfony/cache:v5.1.7, symfony/expression-language:v4.4.15, symfony/lock:v4.4.15, symfony/yaml:v4.4.15, titasgailius/search-relations:1.0.6, true/punycode:v2.1.1, unicodeveloper/laravel-password:1.0.3, voiceit-php/voiceit2:3.6.0, whoops/soap:1.0.0, wildbit/swiftmailer-postmark:3.3.0, maximebf/debugbar:v1.16.3, barryvdh/laravel-debugbar:v3.5.1, phpdocumentor/graphviz:1.0.4, beyondcode/laravel-er-diagram-generator:0.2.3, coderello/laravel-populated-factory:0.3.2, scrivo/highlight.php:v9.18.1.3, filp/whoops:2.9.0, facade/flare-client-php:1.3.7, facade/ignition:1.16.3, fzaninotto/faker:v1.9.1, jakub-onderka/php-console-color:v0.2, jakub-onderka/php-console-highlighter:v0.4, nunomaduro/collision:v3.0.1, webmozart/assert:1.9.1, phpdocumentor/reflection-common:2.2.0, phpdocumentor/type-resolver:1.4.0, phpdocumentor/reflection-docblock:5.2.2, phpunit/php-token-stream:3.1.1, sebastian/version:2.0.1, sebastian/type:1.1.3, sebastian/resource-operations:2.0.1, sebastian/recursion-context:3.0.0, sebastian/object-reflector:1.1.1, sebastian/object-enumerator:3.0.3, sebastian/global-state:3.0.0, sebastian/exporter:3.1.2, sebastian/environment:4.2.3, sebastian/diff:3.0.2, sebastian/comparator:3.0.2, phpunit/php-timer:2.1.2, phpunit/php-text-template:1.2.1, phpunit/php-file-iterator:2.0.2, theseer/tokenizer:1.2.0, sebastian/code-unit-reverse-lookup:1.0.1, phpunit/php-code-coverage:7.0.10, phpspec/prophecy:1.12.1, phar-io/version:2.0.1, phar-io/manifest:1.0.3, myclabs/deep-copy:1.10.1, phpunit/phpunit:8.5.8, squizlabs/php_codesniffer:3.5.8
  - Installing composer/package-versions-deprecated (1.8.0): Reading /home/vagrant/.cache/composer/files/composer/package-versions-deprecated/e0144f2ef71de449d58f78226d7f714cdd51e6e2.zip from cache
Loading from cache
 Extracting archiveExecuting command (CWD): unzip -qq  '/home/vagrant/medsitter/vendor/composer/package-versions-deprecated/11cf1f3f4df742beb354903d77a1d0fc' -d '/home/vagrant/medsitter/vendor/composer/2f87a3d2'
Plugin installation failed (include(/home/vagrant/medsitter/vendor/composer/package-versions-deprecated/src/PackageVersions/Installer.php): failed to open stream: No such file or directory), rolling back
  - Removing composer/package-versions-deprecated (1.8.0)

  [RuntimeException]
  Could not delete /home/vagrant/medsitter/vendor/composer/package-versions-deprecated/src/PackageVersions:

Exception trace:
 () at phar:///usr/local/bin/composer/src/Composer/Util/Filesystem.php:217
 Composer\Util\Filesystem->unlink() at phar:///usr/local/bin/composer/src/Composer/Util/Filesystem.php:170
 Composer\Util\Filesystem->removeDirectoryPhp() at phar:///usr/local/bin/composer/src/Composer/Util/Filesystem.php:137
 Composer\Util\Filesystem->removeDirectory() at phar:///usr/local/bin/composer/src/Composer/Downloader/FileDownloader.php:238
 Composer\Downloader\FileDownloader->remove() at phar:///usr/local/bin/composer/src/Composer/Downloader/DownloadManager.php:299
 Composer\Downloader\DownloadManager->remove() at phar:///usr/local/bin/composer/src/Composer/Installer/LibraryInstaller.php:224
 Composer\Installer\LibraryInstaller->removeCode() at phar:///usr/local/bin/composer/src/Composer/Installer/LibraryInstaller.php:137
 Composer\Installer\LibraryInstaller->uninstall() at phar:///usr/local/bin/composer/src/Composer/Installer/PluginInstaller.php:66
 Composer\Installer\PluginInstaller->install() at phar:///usr/local/bin/composer/src/Composer/Installer/InstallationManager.php:173
 Composer\Installer\InstallationManager->install() at phar:///usr/local/bin/composer/src/Composer/Installer/InstallationManager.php:160
 Composer\Installer\InstallationManager->execute() at phar:///usr/local/bin/composer/src/Composer/Installer.php:611
 Composer\Installer->doInstall() at phar:///usr/local/bin/composer/src/Composer/Installer.php:232
 Composer\Installer->run() at phar:///usr/local/bin/composer/src/Composer/Command/InstallCommand.php:122
 Composer\Command\InstallCommand->execute() at phar:///usr/local/bin/composer/vendor/symfony/console/Command/Command.php:245
 Symfony\Component\Console\Command\Command->run() at phar:///usr/local/bin/composer/vendor/symfony/console/Application.php:835
 Symfony\Component\Console\Application->doRunCommand() at phar:///usr/local/bin/composer/vendor/symfony/console/Application.php:185
 Symfony\Component\Console\Application->doRun() at phar:///usr/local/bin/composer/src/Composer/Console/Application.php:281
 Composer\Console\Application->doRun() at phar:///usr/local/bin/composer/vendor/symfony/console/Application.php:117
 Symfony\Component\Console\Application->run() at phar:///usr/local/bin/composer/src/Composer/Console/Application.php:113
 Composer\Console\Application->run() at phar:///usr/local/bin/composer/bin/composer:61
 require() at /usr/local/bin/composer:24
Seldaek commented 3 years ago

Ok yeah from that what it looks like is:

I think we could try to workaround this in the PluginManager::registerPackage by detecting the issue, sleeping for a bit and trying again to see if the file magically appeared. If you can install composer from source and try that that'd be great, otherwise I'll try to have a go at it sometime I guess.

amacsmith commented 3 years ago

I would love to help! Can you point me at a guide or documentation on how to install composer from source or anything I would need to do to debug it?

Seldaek commented 3 years ago

composer create-project composer/composer:dev-master --keep-vcs should get you started. You can then run it from bin/composer in that directory instead of your machine-installed one.

Seldaek commented 3 years ago

Or just fork the repo, clone it, and run composer install in it, nothing very special about it :)

amacsmith commented 3 years ago

Thank you very much! Appreciate your time.

SnowPenguin commented 3 years ago

I am also encountering this same issue while attempting to install Symfony 5 packages in a Vagrant/Virtual Box environment using Composer 2.0.8 and php 7.4.11.

zhaoqinghuan commented 3 years ago

Now I have this problem too: image This is my development environment information: image

zhaoqinghuan commented 3 years ago

I tried to switch between the composer version and the php version but failed to solve the bug. help me~

zhaoqinghuan commented 3 years ago

I removed the extension that depends on this extension and the build succeeded.

amacsmith commented 3 years ago

@zhaoqinghuan Which extension is that?

zhaoqinghuan commented 3 years ago

@amacsmith It is an extension of nligo/mongodb. I solved this problem after specifying the version number through the composer require nligo/mongodb ^1.0 command.

ramondelafuente commented 3 years ago

Just ran into this one on:

Vagrant version: 2.2.14
Virtualbox version: 6.1.16 
GuestAdditions version: 6.1.16
Composer version: 2.0.7
PHP version: 7.4.13
Virtual machine: Linux debian-buster64 4.19.0-8-amd64
Host machine: MacOs 11.0.1

I believe there is quite some history behind this particular issue, just posting some references here because this keeps coming back like a zombie from Walking Dead.

https://www.virtualbox.org/ticket/18776#comment:5 https://github.com/laravel/homestead/issues/1240

I can confirm that downgrading to composer v1 does... let's say... make the problem less likely to occur (to prevent saying "fixes it"). It also only occures on the shared folder, running fully inside the VM works fine.

Seldaek commented 3 years ago

Closing in favor of https://github.com/composer/composer/issues/9627