Vagrant Unable to Locate Virtualbox

On Ubuntu 16.04.01

Using vagrant 1.8.1 and virtualbox 5.1.12. I have already set

VBOX_INSTALL_PATH=/usr/bin/virtualbox
VBOX_MSI_INSTALL_PATH=/usr/bin/virtualbox

Getting the following error:

$ vagrant up
No usable default provider could be found for your system.

Vagrant relies on interactions with 3rd party systems, known as
"providers", to provide Vagrant with resources to run development
environments. Examples are VirtualBox, VMware, Hyper-V.

The easiest solution to this message is to install VirtualBox, which
is available for free on all major platforms.

If you believe you already have a provider available, make sure it
is properly installed and configured. You can see more details about
why a particular provider isn't working by forcing usage with
`vagrant up --provider=PROVIDER`, which should give you a more specific
error message for that particular provider.

as also this one:

$ vagrant up --provider=VIRTUALBOX
The provider 'VIRTUALBOX' could not be found, but was requested to
back the machine 'default'. Please use a provider that exists.

Any suggestions?

1

1 Answer

There seems to be a compatibility issue with the particular versions of vagrant and virtualbox.

A workaround seems to be the following:

A.

cd /usr/share/vagrant/plugins/providers/virtualbox/driver

edit meta.rb and add

"5.1" => Version_5_1

under the line: "5.0" => Version_5_0, (should be around line 63)

B.

cd /usr/share/vagrant/plugins/providers/virtualbox/

edit plugin.rb and add

autoload :Version_5_1, File.expand_path("../driver/version_5_1", __FILE__)

under the line: autoload :Version_5_0, File.expand_path("../driver/version_5_0", __FILE__) (should be around line 58)

C.

cd /usr/share/vagrant/plugins/providers/virtualbox/driver

create a file named version_5_1.rb with these contents.

Hopefully this tackles the problem.

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Robert Thorne

Robert Thorne

Automotive & Future Transportation Editor

Robert Thorne covers electric vehicle innovations, autonomous driving systems, global mobility trends, and automotive engineering developments.

Share this article
Twitter Facebook Pinterest