关于python:Vagrant无法找到Virtualbox

关于python:Vagrant无法找到Virtualbox

Ubuntu 16.04.01

使用vagrant 1.8.1virtualbox 5.1.12。我已经设置了

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

收到以下错误:

$ 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.

还有这个:

$ 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.

有什么建议么?

答案1

似乎有一个兼容性问题使用特定版本的 vagrant 和 virtualbox。

解决方法如下:

A。

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

编辑meta.rb和添加

"5.1" => Version_5_1

行下:("5.0" => Version_5_0,应该在第 63 行左右)

B.

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

编辑plugin.rb和添加

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

行下:(autoload :Version_5_0, File.expand_path("../driver/version_5_0", __FILE__)应该在第 58 行左右)

C。

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

version_5_1.rb创建名为这些内容

希望这能解决问题。

相关内容