Fix for “Unable to resolve dependency” Vagrant issue on macOS
1 min readDec 27, 2020
I mostly use Docker, but I need to play around with Ansible, so I’ve decided to blow the dust off the Vagrant.
My plan was damn simple: to run Ubuntu 20.04 in Vagrant on MacOS:
vagrant init ubuntu/focal64
And I got an error:
Vagrant failed to initialize at a very early stage
// blah blah blah
I went like:
vagrant plugin repair
No luck:
Failed to automatically repair installed Vagrant plugins
// blah blah
Then I:
vagrant plugin expunge --reinstall
Nope:
// blah blah
Unable to resolve dependency: user requested 'vagrant-vbguest (= 0.15.2)'
And now the magic part!
vagrant plugin install vagrant-vbguest
I got:
Installing the 'vagrant-vbguest' plugin. This can take a few minutes...
Installed the plugin 'vagrant-vbguest (0.28.0)'!
Then again:
vagrant plugin expunge --reinstall
Perfect.
And right after that, we go back to the beginning:
vagrant init ubuntu/focal64
with the result:
A `Vagrantfile` has been placed in this directory. You are now
ready to `vagrant up` your first virtual environment!
I suppose this is not only about the vagrant-vbguest plugin. Just adapt to your case, maybe vagrant-hostmanager or something else.
🤙🏼