-
Notifications
You must be signed in to change notification settings - Fork 4.4k
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
Vagrant 2.2.4 fails to install vagrant-vbguest plugin #10826
Comments
Hi @dsofeir - Just to check, do you have any other plugins installed with vagrant? Does it work after you run
|
Hi @briancain The long answer is: Have you noticed in the debug output (https://gist.github.com/dsofeir/ccd78030262839d80ed85964a52037f2), line 318-319, I have both version 1.2.1 and 2.0.0 of the net-scp gem installed on my system. Is this the case in the environment you are trying to recreate the error on? |
@dsofeir - Do you have the I tried reproducing it with a fresh install of Vagrant and no other plugins installed. You shouldn't have multiple versions of |
@briancain - No, I did not install If I remove v2.0.0 of the So I suppose the problem is that vagrant's dependency on version 1.2.1 of |
@dsofeir - How did you install Vagrant? Did you use one of the packages on https://www.vagrantup.com/? It looks like your Vagrant is using system ruby, where as the officially supported packages have its own isolated set of gems, which shouldn't have this issue at all. |
@briancain - I installed Vagrant using the OpenSUSE package. A fair point, I will contact the package maintainer. Thank you for your help. |
Hi, I'm the package maintainer of vagrant in openSUSE. This error is caused by The simplest solution to these kinds of problems is to delete the gems with the wrong version (preferably via the same method as it was installed, i.e. rpms via zypper), run From a my perspective there is unfortunately very little that I can do to prevent these kinds of problems: the only bullet proof way that doesn't involve deactivating plugin installation is to confine vagrant and all it's dependent gems into a separate directory. But that would involve duplicating a huge number of packages and is nothing that I have time for. I have started to create a RPM of |
@dcermak Hi! Vagrant does not use bundler for dependency resolution. It did at one point in the past but that integration was replaced some time ago. Vagrant is built around using the installer packages which provide an isolate environment which Vagrant operates in. This results in a specific behavior when it comes to installed gems (where the defined "system" gems are only those vendored within the Vagrant installer package). Running Vagrant outside of the installers is generally done using bundler, which provides the same type of environment. I'll have a look at how the resolution behaves when running as a system installed gem and see if I can fix the issue there. |
Hm, then I don't really understand the error that @dsofeir got from
This behavior won't be present in the RPM package on openSUSE & Fedora (whose approach I mostly copied), as we install vagrant like any other gem (only difference is that it lands in a different directory). Vagrant itself is invoked via a wrapper script that sets Unfortunately I am really not a packaging expert when it comes to rubygems, so please forgive me if parts of the above don't make any sense. CC @voxik (who authored the vagrant packaging approach that I ported to openSUSE) |
I had a similar issue with that:
Also on Fedora 30. I fixed it by using |
Well, the problem on Fedora is, that we are using more recent versions of some packages then Vagrant itself uses and we have to modify the dependency chain. But when the RubyGems dep solver internally used by Vagrant tries to resolve the dependecies to be able to install the plugin, it takes the dependecy information from rubygems.org instead of reflecting the local dependencies. The best option is to package this plugin into RPM. The other option is go to talk to Bundler/RubyGems upstream that they should respect what is on the system. |
Actually, there is third option. Help Fog folks to have their dependency chain in shape and help Vagrant folks to update their dependencies. |
Actually this is probably relevant just to vagrant-libvirt users. |
Also, this message should have been modified long time ago: https://github.com/hashicorp/vagrant/blob/master/templates/locales/en.yml#L705 |
I had the same problem on Fedora 30.
In the end i was not able to install any plugin. This problem is very annoying and drove me nuts because it was difficult to understand the core problem (no ruby or vagrant dev) and it appeared out of nowhere. But with |
@CBrazel Today I also encountered the issue with 'fog-core' on OpenSUSE:
|
Having the exact same issue as @dsofeir on Fedora 30, after running |
Same issue as @dsofeir too:
Plugin install works with no errors! :-D
|
Duplicate of #292 |
Honestly, this all looks a bit like vagrant might not be doing dependency resolution optimally or at least that it rejects some potentially valid resolutions as invalid. Otherwise we wouldn't be able to install vagrant plugins as RPMs (they have mostly the same dependencies as the gems and RPM also verifies that each dependency gets resolved). But I can be very well wrong in this regard, because at least the |
Same with 2.2.6 on Fedora 31
|
Same with Pop!_OS/Ubuntu 19.10
I have expunged / repaired and completely deleted and reinstalled the
The big debug dump:
|
@CBrazel @dsofeir I encountered the exact same problem on Fedora 31 today when I tried to install vagrant-vbguest: Bundler, the underlying system Vagrant uses to install plugins,
reported an error. The error is shown below. These errors are usually
caused by misconfigured plugin installations or transient network
issues. The error from Bundler is:
conflicting dependencies fog-core (~> 1.43.0) and fog-core (= 2.1.2)
Activated fog-core-2.1.2
which does not match conflicting dependency (~> 1.43.0)
Conflicting dependency chains:
fog-core (= 2.1.2), 2.1.2 activated This is what fixed it for me. I do not know if this is recommended, so I'd be grateful if someone could confirm this. You need to uninstall vagrant-libvirt which comes out of the box with vagrant: dnf remove vagrant-libvirt This is actually a vagrant plugin. But this won't work since it's a "system plugin": vagrant plugin uninstall vagrant-libvirt Million dollar question: Is this is a good idea? In my mind, the correct answer is YMMV. The plugin is a separate project on Github: https://github.com/vagrant-libvirt/vagrant-libvirt and So far, I've stuck with vanilla VirtualBox as a single user. Removing vagrant-libvirt doesn't seem to be a problem. But that's just my anecdotal experience talking here. Even so, after installing vagrant-vbguest, you could simply try and install vagrant-libvirt again, after re-installation, vagrant-vbguest seems to keep working just fine. Of course, this is just a cheap work around. |
@netsensei Your approach is a good idea, because by removing the @briancain @chrisroberts Any chance you'll be able to take a look at how vagrant resolves dependencies so that it can handle these kind of issues more gracefully? |
Try to delete |
@netsensei here is an alternative to what you did:
The second line will re-install vagrant without vagrant-libvirt I'm having another issue while installing vagrant-vguest plugin:
I tested every solution proposed here, but none worked.
I don't know gem well. Is there an equivalent to Python Virtualenv, to avoid this kind of dependency hell, we could use? |
vagrant plugin update worked for me after I executed brew cask uninstall vagrant and re-installed it after a brew cleanup. Thanks |
same issue with vagrant 2.2.8 |
|
lsb_release -a
No LSB modules are available.
Distributor ID: Debian
Description: Debian GNU/Linux 10 (buster)
Release: 10
Codename: buster
$ vagrant plugin list
No plugins installed.
vagrant plugin install vagrant-vbguest
Installing the 'vagrant-vbguest' plugin. This can take a few minutes...
Bundler, the underlying system Vagrant uses to install plugins,
reported an error. The error is shown below. These errors are usually
caused by misconfigured plugin installations or transient network
issues. The error from Bundler is:
conflicting dependencies excon (= 0.54.0) and excon (= 0.60.0)
Activated excon-0.60.0
which does not match conflicting dependency (= 0.54.0)
Conflicting dependency chains:
excon (= 0.60.0), 0.60.0 activated
versus:
excon (= 0.54.0)
Gems matching excon (= 0.54.0):
excon-0.54.0 The thing i dont understand is that after a sudo apt autoremove I get another error message: vagrant plugin install vagrant-vbguest
Installing the 'vagrant-vbguest' plugin. This can take a few minutes...
Bundler, the underlying system Vagrant uses to install plugins,
reported an error. The error is shown below. These errors are usually
caused by misconfigured plugin installations or transient network
issues. The error from Bundler is:
conflicting dependencies minitest (= 5.9.0) and minitest (= 5.11.3)
Activated minitest-5.11.3
which does not match conflicting dependency (= 5.9.0)
Conflicting dependency chains:
minitest (= 5.11.3), 5.11.3 activated
versus:
minitest (= 5.9.0)
Gems matching minitest (= 5.9.0):
minitest-5.9.0
sudo vagrant plugin list
No plugins installed. |
use this, it works! set VAGRANT_DISABLE_STRICT_DEPENDENCY_ENFORCEMENT=1 && vagrant plugin install <library> just replace the name of library |
Bug description
Plugin 'vagrant-vbguest' won't install after fresh install of vagrant
Vagrant version
2.2.4
Host operating system
OpenSUSE Tumbleweed 5.0.9-1-default
Vagrantfile
Debug output
See: https://gist.github.com/dsofeir/ccd78030262839d80ed85964a52037f2
Expected behavior
The plugin 'vagrant-vbguest' should have installed
Actual behavior
The plugin 'vagrant-vbguest' failed to install with error:
Note: Setting
VAGRANT_DISABLE_STRICT_DEPENDENCY_ENFORCEMENT=1
temporarily fixes the problemSteps to reproduce
vagrant plugin install vagrant-vbguest
References
The text was updated successfully, but these errors were encountered: