Laravel Homestead 报告 Vagrant 的版本不正确,因此不允许我 运行 VM

Laravel Homestead reports incorrect version of Vagrant and thus does not let me run the VM

我是 运行ning Linux Mint 19.3,之前已经多次设置 Homestead Vagrant 盒子。我正在关注 the simple directions on the official site。我安装并启动了 Homestead(从发布分支克隆),下载了最新版本的 Vagrant 2.2.6,配置了我的 Homestead.yaml 和主机文件,但是当我 运行 vagrant up,我得到:

version to satisfy the following version requirements:

  >= 2.2.4

You are running Vagrant 2.0.2, which does not satisfy
these requirements. Please change your Vagrant version or update
the Vagrantfile to allow this Vagrant version. However, be warned
that if the Vagrantfile has specified another version, it probably has
good reason to do so, and changing that may cause the environment to
not function properly.

这是全新安装的 mint,机器上没有其他版本的 vagrant。我已经为 2.0.2 搜索了整个驱动器,但没有结果。为什么它报告错误的版本并且不让我的 运行 直到我 "upgrade"?

看来您不小心安装了早期版本的 Vagrant 程序。下面列出了删除当前安装并下载新安装的步骤。

正在卸载 Vagrant:

rm -rf /opt/vagrant
rm -f /usr/bin/vagrant

确保安装了 VirtualBox:

sudo apt install virtualbox

更新包列表:

sudo apt update

使用 Curl 下载 Vagrant 2.2.6:

curl -O https://releases.hashicorp.com/vagrant/2.2.6/vagrant_2.2.6_x86_64.deb

下载后:

sudo apt install ./vagrant_2.2.6_x86_64.deb

验证安装成功:

vagrant --version

预期输出:

Vagrant 2.2.6