我按照 Laravel Homestead 文档进行了克隆git clone homestead
和更改,当我执行命令时出现了以下错误。Homestead.yaml
vagrant up
我在 Windows 10 上将 Vagrant 2.2.14 与 VirtualBox 结合使用,并且正在使用 Visual Studio。
我试过:
rm vagrant
和:
vagrant init
但它不起作用。
错误如下:
Bringing machine 'homestead' up with 'virtualbox' provider...
==> homestead: Box 'laravel/homestead' could not be found. Attempting to find and install...
homestead: Box Provider: virtualbox
homestead: Box Version: >= 11.0
==> homestead: Loading metadata for box 'laravel/homestead'
homestead: URL: https://vagrantcloud.com/laravel/homestead
The box you're attempting to add has no available version that
matches the constraints you requested. Please double-check your
settings. Also verify that if you specified version constraints,
that the provider you wish to use is available for these constraints.
Box: laravel/homestead
Address: https://vagrantcloud.com/laravel/homestead
Constraints: >= 11.0
Available versions: 0.1.0, 0.1.1, 0.1.2, 0.1.3, 0.1.4, 0.1.5, 0.1.6, 0.1.7, 0.1.8, 0.1.9, 0.2.0, 0.2.1, 0.2.2, 0.2.4, 0.2.5, 0.2.6, 0.2.7, 0.3.0, 0.3.3, 0.4.0, 0.4.1, 0.4.2, 0.4.4, 0.5.0, 0.6.0, 0.6.1, 1.0.0, 1.0.1, 1.1.0, 2.0.0, 2.1.0, 2.2.0, 3.0.0, 3.1.0, 4.0.0, 5.0.1, 5.1.0, 5.2.0, 6.0.0, 6.1.0, 6.2.0, 6.3.0, 6.4.0, 7.0.0, 7.1.0, 7.2.1, 8.0.0.pre.alpha1, 8.0.0.pre.alpha2, 8.0.0.pre.alpha3, 8.0.0.pre.alpha4, 8.0.0.pre.beta, 8.0.0, 8.0.1, 8.1.0, 8.2.0, 8.2.1, 9.0.0, 9.0.1, 9.1.0, 9.1.1, 9.2.0, 9.3.0, 9.4.0, 9.5.0, 9.5.1, 9.6.0, 9.6.1, 9.7.2, 10.0.0, 10.1.0, 10.1.1
答案1
似乎有人在第 22 行编辑了 scripts/homestead.rb 文件
将 '>= 11.0' 更改为 '>=10.0' 就可以了
您还可以检查较旧的分支:18.04 该问题于 12 月 26 日合并,较旧的分支没有该问题。