-
-
Notifications
You must be signed in to change notification settings - Fork 69
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Unable to install on vboxfs #107
Comments
I'd need to have a reproducible test case for this to work: I no longer use vagrant/virtualbox either. Since this started popping up a few weeks ago, with no changes to the filesystem operations in here, I suggest bisecting upstream first. |
I am getting the same error also with the first version of package-versions I'll try to make a test case. |
Yeh, as I said, how files are written to disk barely changed here 😐 |
It can be reproduced with Windows 10, VirtualBox 6.0.10 + Extension Pack, Vagrant 2.2.5. Vagrantfile:
Commands:
|
Anyone got a windows environment where to try this out? I don't have such an environment myself... |
I can reproduce it on 2 different PCs. Anything you want me to do? |
We probably need to test this in a windows environment on travis-ci (https://docs.travis-ci.com/user/reference/windows/) |
VirtualBox/Vagrant is not running in travis-ci (see travis-ci/travis-ci#6060 (comment)). |
Just stumbled upon this too after upgrading to PHP 7.3. Everything was fine as long as I used my existing Vagrant + VirtualBox 6.0 + Ubuntu 18.04. There are no permission issues. |
https://github.com/composer/composer/blob/master/src/Composer/Installer/PluginInstaller.php#L65 it all begins with this, but Composer unhelpfully swallows the exception message and trace. |
I guess the real issue is that Composer gets all the way here: https://github.com/composer/composer/blob/dc964d6515f7e4d609b86ff5b2ba917e2550e783/src/Composer/Util/Filesystem.php#L137. It's supposed to be issuing an |
@Jalle19 thanks for digging into this! It seems like it is indeed affecting all of composer, not just this package :-\ |
I tried a ton of things and it turns out that downgrading VirtualBox to 6.0.4 fixes this problem. According to the CHANGELOG they "Linux guests: shared folder performance and reliability improvements and missing features (bugs #17360, #819)", which did exactly the opposite. @alexgit2k I suggest you try downgrading to 6.0.4 in case it fixes the issue for you too. @Ocramius you can close this IMO since it's neither a bug in this package nor Composer, it just manifests itself with this one since Composer does some special read/write operations for plugins compared to "normal" dependencies. |
I'll leave it open for now: lots of folks landing here, instead of opening new issues. |
My coworker has this problem with VirtualBox 6.0.6, while I run VirtualBox 6.0.4 and have no issues. So I think you're onto something here. Update: he reverted to 6.0.4 and ran the existing (Homestead) VM, which didn't work. Then he destroyed and recreated the VM and it worked again. So it's nothing conclusive unfortunately. |
In the latest version 6.0.12 of VirtualBox they fixed a regression introduced by the shared folder change in 6.0.6 (see https://www.virtualbox.org/ticket/18737). However I still get the same error in 6.0.12. I reverted back to VirtualBox 6.0.4 where it works without problems and created a ticket at VirtualBox: https://www.virtualbox.org/ticket/18937 |
We had the very same problem but with a boot2docker setup. No matter if we used VB 6.0.4 or 6.0.10 or 6.0.12. We finally managed to solve the problem by upgrading to boot2docker 19.03.2 from 19.03.1. Boot2Docker 19.03.1 uses So I guess there are definitely some issues with the newer guest extension when they downgrade the version. Maybe it's a red herring, but you should try to switch to the older guest extension, it works fine with VirtualBox 6.x. |
@mw-jko according to the change log you posted they didn't just downgrade the guest extensions, they downgraded the whole VirtualBox. |
VirtualBox inside boot2docker-Iso does not make sense. Please check the changed lines:
I'm successfuly running Docker Toolbox 19.03.1 with Virtualbox 6.0.12 using the Boot2Docker-Iso 19.03.2 (yay, need more layers :D) atm and I'm able to run With the exakt same setup (but with Boot2Docker-Iso 19.03.1) I got the same error as the OP (@alexgit2k):
|
Nevermind, you're right. |
I found using the 9p options |
I will downgrade to 6.0.4 later (if composer is having problems with this, chances are other software will too). But... if someone just wants a "make it work right now" solution for this specific bug:
cat >/usr/local/bin/unzip <<EOF
#!/bin/sh
/usr/bin/unzip "$@"
sleep 1
EOF
chmod 755 /usr/local/bin/unzip Yeah, I did that. And it works. Hopefully a downgrade to VirtualBox 6.0.4 tomorrow is a better fix. |
@frickenate WTF nice hack, it works :D |
I was able to reproduce this on macOS Catalina with VirtualBox 6.0.15 r135660 and Vagrant 2.2.6. Here are the steps to reproduce: cat >Vagrantfile <<EOF
\$script = <<-SCRIPT
apt-get update
apt-get install -y php-cli php-json php-xdebug php-xml php-zip unzip composer
SCRIPT
Vagrant.configure("2") do |config|
config.vm.box = "ubuntu/eoan64"
config.vm.provision "shell", inline: \$script
config.vm.synced_folder "./test", "/home/vagrant/test"
end
EOF
mkdir test
vagrant up
vagrant ssh Then, inside the VM: cd test/
composer require ocramius/package-versions You should see this output:
It's important to note that this error only occurs when trying to install |
If I try the unzip hack described by @frickenate, I get a different error:
|
I found a solution that works for me... If you change the
|
FYI, my unzip workaround was a temporary “make this work right now” hack. The correct solution to this problem, which I enacted the next day, is to downgrade to VirtualBox 6.0.4. This resolves the issue, as the behaviour/bug was introduced in VirtualBox 6.0.6 and hasn’t yet been fixed in any later 6.0 or 6.1 version. |
I ran into this problem aswell - my solution was removing the vendor folder and do: "composer install --no-scripts --no-custom-installers" which worked for me. |
I'm using bento/ubuntu-18.04 image. Downgrading Virtualbox alone didn't help, in my case. I found that downgrading the Virtualbox Guest Addition helps. I downgraded both Virtualbox and Guest Addition to version 6.0.0. I found the following gist on how to downgrade the Guest Addition: You'll need gcc, make and perl packages installed for the above gist. |
Just checked @agus-k solution and it works fine for me. |
This issue will disappear once #139 is implemented: at that point, this library should no longer write to disk during |
…NAME` constant This simplifies the tool to no longer be a plugin: `PackageVersions\Versions` is now a much simpler class that is no longer generated/written to disk at installation, and `ocramius/package-versions` is no longer a `"type": "composer-plugin"`, but rather a more usual `"type": "library"` package. This: * Fixes #138 - this library no longer changes `vendor` post-installation * Fixes #142 - the `rootPackage` version is now detected via composer, and no longer leads to changes in `vendor/ocramius/package-versions/src/PackageVersions/Versions.php` at each change of source root in a project * Fixes #152 - when `"lock": false` is used in composer, since we no longer access lock file information from sources of this package * Fixes #107 - writing to `vendor` is no longer happening from this library, so no file access rights should be needed.
…NAME` constant This simplifies the tool to no longer be a plugin: `PackageVersions\Versions` is now a much simpler class that is no longer generated/written to disk at installation, and `ocramius/package-versions` is no longer a `"type": "composer-plugin"`, but rather a more usual `"type": "library"` package. This: * Fixes #138 - this library no longer changes `vendor` post-installation * Fixes #142 - the `rootPackage` version is now detected via composer, and no longer leads to changes in `vendor/ocramius/package-versions/src/PackageVersions/Versions.php` at each change of source root in a project * Fixes #152 - when `"lock": false` is used in composer, since we no longer access lock file information from sources of this package * Fixes #107 - writing to `vendor` is no longer happening from this library, so no file access rights should be needed.
I suspect the root cause to be in VirtualBox's |
The error has already been reported at #98, but the assumption that it is a permission / UID issue is wrong.
When installing under xfs it works without problems:
But when installing under vboxfs (Virtualbox, Windows) it fails:
The error-message ist:
Tested with Cent OS 7, PHP 7.3, composer 1.9.0-1.6.0
I can install many other packages without problems under the vbofs:
However, only when using the sleep-trick at laravel/homestead#1240 (comment) in composer I can install ocramius/package-versions under vboxfs without problems. So it looks like there is something special in ocramius/package-versions which other packages do not have. But what?
The text was updated successfully, but these errors were encountered: