上Ubuntu 16.04.01
使用vagrant 1.8.1
和virtualbox 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.
有什么建议么?
vagrant 和 virtualbox 的特定版本似乎存在兼容性问题。
一种解决方法似乎如下:
一个。
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
的文件。希望这可以解决问题。