composer / package-versions-deprecated

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

Install of composer/package-versions-deprecated failed #26

Closed irafaelfurtado closed 3 years ago

irafaelfurtado commented 3 years ago

Greetings! I am informing that I had this problem using Vagrant + Windows 10 pro + PHP 8 following guidelines written in the official Laravel documentation. When I installed the project using windows composer, everything worked normally. But when I tried to use vagrant composer using SSH (vagrant ssh) I had this error. Install of composer/package-versions-deprecated failed Could not delete /home/vagrant/autodeploy/vendor/phpdocumentor/reflection-common: image After much researching, I found the solution this error shown below:

Using the vagrant user via ssh execute all the commands below: sudo apt update cd ~ curl -sS https://getcomposer.org/installer -o composer-setup.php HASH="curl -sS https://composer.github.io/installer.sig" php -r "if (hash_file('SHA384', 'composer-setup.php') === '$HASH') { echo 'Installer verified'; } else { echo 'Installer corrupt'; unlink('composer-setup.php'); } echo PHP_EOL;" sudo php composer-setup.php --install-dir=/usr/local/bin --filename=composer

After that the composer install and update will work perfectly.

Seldaek commented 3 years ago

We have fixed this bug in Composer, this is unrelated to this repo. Keeping composer up to date is always a good idea :)