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

Tom*_*asz 58 virtualbox vagrant 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.
Run Code Online (Sandbox Code Playgroud)

我在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)
Run Code Online (Sandbox Code Playgroud)

"提供者"有什么问题

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.
Run Code Online (Sandbox Code Playgroud)

如何帮助他检测VirtualBox?

etu*_*usm 55

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

Virtualbox 5.0.10工作得很好.

  • 仅供参考:Vagrant 1.8.5应该与5.1一起工作(刚刚在Github上查看了Vagrant的更改日志),但是从今天开始未发布. (2认同)
  • 已验证1.8.5和5.1一起工作 (2认同)

Ada*_*dam 22

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

  • 谢谢! - 使用VirtualBox 5.0.10更新到Vagrant 1.8.1也适合我.没有删除.vagrant文​​件.现在有人告诉我们原因.:) (2认同)

Fré*_*nri 7

自VirtualBox 4.3.12以来似乎报告了一个问题:

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

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


Ser*_*nko 6

只需尝试引入流浪者并指定您要使用的提供者:

vagrant up --provider virtualbox
Run Code Online (Sandbox Code Playgroud)

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

在此输入图像描述


Rub*_*alo 5

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

  1. 在Windows桌面上单击"此PC"/"我的电脑"
  2. 选择"属性"
  3. 转到"高级"选项卡
  4. 单击底部的"环境变量..."
  5. 在系统变量下单击"新建..."
  6. 将"变量名称"设置为"VBOX_INSTALL_PATH"
  7. 将"变量值"设置为"C:\ Program Files\Oracle\VirtualBox \"
  8. 选择"确定"并关闭所有其他设置窗口

信用到这里:https: //github.com/mitchellh/vagrant/issues/3852

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