在 OSX 10.15.2 Catalina 上安装 Vagrant 2.2.6

Install Vagrant 2.2.6 on OSX 10.15.2 Catalina

如何在OSX10.15.2上安装vagrant?

安装 virtualbox 和 vagrant 后:

brew cask install virtualbox   # installs version 6.1
brew cask install vagrant      # installs version 2.2.6

我在启动 vagrant 时 运行 遇到这个错误:

The provider 'virtualbox' that was requested to back the machine
'default' is reporting that it isn't usable on this system. The
reason is shown below:

Vagrant has detected that you have a version of VirtualBox installed
that is not supported by this version of Vagrant. Please install one of
the supported versions listed below to use Vagrant:

4.0, 4.1, 4.2, 4.3, 5.0, 5.1, 5.2, 6.0

A Vagrant update may also be available that adds support for the version
you specified. Please check www.vagrantup.com/downloads.html to download
the latest version.

Vagrant 2.2.6 不支持 VirtualBox 6.1。您可以使用旧版本的 virtualbox cask 脚本安装 VirtualBox 6.0(受支持),如下所示:

brew cask install https://raw.githubusercontent.com/Homebrew/homebrew-cask/7e703e0466a463fe26ab4e253e28baa9c20d5f36/Casks/virtualbox.rb

Vagrant 2.2.7 将包括对 virtualbox 6.1 的支持,但在撰写本文时尚未发布:https://github.com/hashicorp/vagrant/issues/11249