Ocramius / PackageVersions

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

Plugin installation failed #98

Closed VincentLanglet closed 5 years ago

VincentLanglet commented 5 years ago

A friend started a project and get this error during the composer install.

image

This is the repo to reproduce the bug: https://github.com/ak3l/Cours_Symfony4/tree/bug

Instead following the actual README, do composer install without --no-plugins --no-scripts to get the error.

When I run composer install -vv, I get

 - Installing ocramius/package-versions (1.4.0): Reading /home/vagrant/.composer/cache/files/ocramius/package-versions/9015316288b55423c693c083934dccb5ab72981d.zip from cache
Loading from cache
 Extracting archiveExecuting command (CWD): unzip -qq  '/home/vagrant/code/vendor/ocramius/package-versions/200f6a66a0865848df9170ec0fd15921' -d '/home/vagrant/code/vendor/composer/f1785882'
Plugin installation failed, rolling back
Ocramius commented 5 years ago

Duplicate of #97- please check that you aren't using mixed users when creating the /home/vagrant/code/vendor directory.

Operating with mixed UID on a linux system will indeed lead to files owned by separate users, and that will (by design) prevent separate users from editing each other's files unless they are in the same group and the files have group rights.

VincentLanglet commented 5 years ago

@Ocramius I dont have multiple user. image

Ocramius commented 5 years ago

Do you have a full trace for the error above?

VincentLanglet commented 5 years ago

@Ocramius This is all I have:

image

Ocramius commented 5 years ago

And you run that with the vagrant user?

This is the second report of issues with homestead, so please report upstream on their end: something has been recently messed up there.

VincentLanglet commented 5 years ago

Yes, I run composer install with the vagrant user.

I did report the issue on homestead too. But since I don't have knowledge about both vagrant & composer plugin, I wasn't sure if it was a homestead issue or an ocramius issue.

Ocramius commented 5 years ago

From the trace above, there are files in there that aren't set up with the correct rights, so I suspect it's mostly a UID issue in how homestead runs CLI tasks.