无法流浪 - 如何设置“提供者”

时间:2015-04-04 19:15:52

标签: vagrant virtualbox vagrantfile

我正在尝试运行流浪汉但出现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.

我在VirtualBox版本4.3.26 r989888和Linux Ubuntu(64位)之前安装

在: vagrant box add precise32 http://files.vagrantup.com/precise32.box

==> box: Adding box 'precise32' (v0) for provider: box: Downloading: http://files.vagrantup.com/precise32.box box: Progress: 100% (Rate: 1425k/s, Estimated time remaining: --:--:--) ==> box: Successfully added box 'precise32' (v0) for 'virtualbox'!

当我列出时 vagrant box list

lucid32   (virtualbox, 0)
precise32 (virtualbox, 0)

"提供商"

出了什么问题

vagrant package --base vagrant-ubuntu64

Vagrant could not detect VirtualBox! Make sure VirtualBox is properly installed.

Vagrant uses the `VBoxManage` binary that ships with VirtualBox, and requires
this to be available on the PATH. If VirtualBox is installed, please find the
`VBoxManage` binary and add it to the PATH environmental variable.

如何帮助他检测VirtualBox?

7 个答案:

答案 0 :(得分:54)

快速注意 - Vagrant 1.8.4和Virtualbox 5.1.X在MacOS 10.11上不兼容(无法设置提供商)。

Virtualbox 5.0.10运行正常。

答案 1 :(得分:20)

我能够通过安装最新版本的Vagrant来解决这个问题(截至本文撰写1.7.4)。

答案 2 :(得分:6)

自VirtualBox 4.3.12以来,似乎已经报告了issue

VirtualBox会自动创建以下环境变量VBOX_MSI_INSTALL_PATH

但是,vagrant(如果你查找base.rb文件)使用变量VBOX_INSTALL_PATH

所以你可以 - 更新变量名称VBOX_MSI_INSTALL_PATH并将其更改为VBOX_INSTALL_PATH - 创建一个与VBOX_INSTALL_PATH

具有相同值的新变量名VBOX_MSI_INSTALL_PATH Windows上的

提醒转到My Computer (right click) --> Properties --> Advanced System Settings --> Environment Variables并查找您需要管理的变量

答案 3 :(得分:5)

好吧所以我遇到了与windows,vagrant和virtualbox相同的问题,并且做到了这一点。

  1. 点击Windows桌面上的“此电脑”/“我的电脑”
  2. 选择“属性”
  3. 转到“高级”标签
  4. 点击底部的“环境变量...”
  5. 在系统变量下,点击“新建...”
  6. 将“变量名称”设置为“VBOX_INSTALL_PATH”
  7. 将“变量值”设置为“C:\ Program Files \ Oracle \ VirtualBox \”
  8. 选择“确定”并关闭所有其他设置窗口
  9. 信誉来到这里: https://github.com/mitchellh/vagrant/issues/3852

    我假设有一个环境变量(或Linux用户的PATH,我认为:P)需要虚拟机可执行文件的“路径”。

答案 4 :(得分:5)

只需尝试使用vagrant并指定您要使用的提供程序:

vagrant up --provider virtualbox

根据下面的屏幕截图,它会告诉您指定提供商无法正常工作的原因。就我而言,它是一个不受支持的VirtualBox 5.2版本。我不得不将它降级到v 5.1

enter image description here

答案 5 :(得分:2)

我正在运行macOS 10.12并使用自制软件安装了vagrant 5.1。

我得到了与OP相同的错误并通过下载最新版本的VirtualBox(v5.1.6)修复了它。

N.B。此版本在download page上标记为amd64,这只是64位标准的名称,并且可以在Intel Mac上正常安装。

答案 6 :(得分:0)

我已经安装了Virtualbox 6.1和Vagrant 2.2.6,并在Mac上出现此错误。我必须将Virtualbox还原为6.0,然后vagrant upubuntu/trusty64一起工作。有关如何发现是否存在兼容性问题,请参见上面的@Serge Voloshenko的答案。