composer / package-versions-deprecated

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

Installation problem with "laravel/framework": "^8.0" in vagrant box #14

Closed javiya-rupal closed 4 years ago

javiya-rupal commented 4 years ago

Installation failed, reverting ./composer.json to its original content.

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

Seldaek commented 4 years ago

Do other installs work? Can you install a package in that vagrant box and check if the vendor dir contains the files as expected?

javiya-rupal commented 4 years ago

Yes other installation works. I was trying to install package in vagrant only and yes vendor directory contains expected file of package.the only issue is with permission. Whenever I try to install package, it create new files everytime inside composer/packages-versions-deprecated/src/PackageVersions

Seldaek commented 4 years ago

Sorry but I don't see what's so special about that package that it would cause issues. Are you using Composer 2 or 1? Can you post the full output of the composer command you are running?

javiya-rupal commented 4 years ago

Composer version 1.10 I am using. and here is the screenshot for error when I run package installation.

Screenshot 2020-10-27 at 10 38 21
Seldaek commented 4 years ago

Ok, no idea what is causing this. I'd try to do this outside of vagrant to see if it's caused by the vagrant filesystem perhaps.

Or you can also try to run composer clearcache just in case the cached archive for that package is corrupt somehow.

Seldaek commented 4 years ago

And you could try to composer self-update --2 to get composer 2, see if it helps.. But you will have to remove hirak/prestissimo then.

javiya-rupal commented 4 years ago

Yes. issue because of vagrant only. I will try if I can install it outside of vagrant anyway. Thanks for the help @Seldaek

Seldaek commented 4 years ago

Or maybe try to update vagrant / virtualbox to latest, might be a bug in there that got fixed already

panvid commented 4 years ago

I have the same problem, not with laravel, but doctrine. It also uses composer/package-versions-deprecated.

Clearing Composer-Cache does not fix it. Removing vendor folder also does not fix it.

vagrant@dp_vagrant_box:/var/www/html$ composer update
Loading composer repositories with package information
Updating dependencies
Nothing to modify in lock file
Installing dependencies from lock file (including require-dev)
Package operations: 142 installs, 0 updates, 0 removals
  - Installing composer/package-versions-deprecated (1.11.99): Extracting archive
    Install of composer/package-versions-deprecated failed

  [RuntimeException]                                                                                             
  Could not delete /var/www/html/vendor/composer/package-versions-deprecated/src/PackageVersions/Installer.php:  

update [--with WITH] [--prefer-source] [--prefer-dist] [--dry-run] [--dev] [--no-dev] [--lock] [--no-install] [--no-autoloader] [--no-scripts] [--no-suggest] [--no-progress] [-w|--with-dependencies] [-W|--with-all-dependencies] [-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] [--prefer-stable] [--prefer-lowest] [-i|--interactive] [--root-reqs] [--] [<packages>]...
Seldaek commented 4 years ago

@dpauli as per the discussion above, seems to be a bug in the virtualbox filesystem, not something we can fix I'm afraid. Please report it to them.

metalagman commented 4 years ago

Found temporal solution in adding "ocramius/package-versions": "2.1.0" to the require section of composer.json.