Making Vagrant work on Fedora 34

June 1, 2021 

We use Vagrant and Virtualbox a lot because it is an excellent tool for infrastructure code development. Unfortunately it is also very prone to breakage during operating system upgrades, especially if you depend on many plugins. When I upgraded from Fedora 32 to 34 Vagrant broken even more than usual due to conflicting rspec dependencies. Basically every Vagrant plugin refused to install with this error message:

$ vagrant plugin install vagrant-vbguest
Installing the 'vagrant-vbguest' plugin. This can take a few minutes...

Vagrant failed to properly resolve required dependencies. These
errors can commonly be caused by misconfigured plugin installations
or transient network issues. The reported error is:

conflicting dependencies rspec (= 3.10.0) and rspec (= 2.14.1)
  Activated rspec-2.14.1
  which does not match conflicting dependency (= 3.10.0)

  Conflicting dependency chains:
    rspec (= 2.14.1), 2.14.1 activated

  versus:
    rspec (= 3.10.0)

  Gems matching rspec (= 3.10.0):
    rspec-3.10.0

The rspec dependency conflict does not sound particularly scary for somebody who is not developing Vagrant or Vagrant plugins. Therefore ignoring the dependencies is likely to be just fine:

$ VAGRANT_DISABLE_STRICT_DEPENDENCY_ENFORCEMENT=1 vagrant plugin install vagrant-vbguest
Installing the 'vagrant-vbguest' plugin. This can take a few minutes...
Fetching micromachine-3.0.0.gem
Fetching vagrant-vbguest-0.29.0.gem
Installed the plugin 'vagrant-vbguest (0.29.0)'!

In my case I had to install a bunch of plugins to get things rolling:

$ export VAGRANT_DISABLE_STRICT_DEPENDENCY_ENFORCEMENT=1
$ vagrant plugin install vagrant-vbguest
$ vagrant plugin install vagrant-hostmanager
$ vagrant plugin install winrm
$ vagrant plugin install winrm-fs
$ vagrant plugin install winrm-elevated
$ vagrant plugin install rexml
Samuli Seppänen
Samuli Seppänen
Author archive
menucross-circle