Vagrant找不到不到laravel/homestead

homestead版本:10.0.0

尝试vagrant up以后, 报错检测检测不到’laravel/homestead’

jimschenchen@Chenyues-MBP Homestead % vagrant up
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: ~> 9.5.0
==> homestead: Loading metadata for box 'laravel/homestead'
    homestead: URL: <https://vagrantcloud.com/laravel/homestead>
==> homestead: Adding box 'laravel/homestead' (v9.5.1) for provider: virtualbox
    homestead: Downloading: <https://vagrantcloud.com/laravel/boxes/homestead/versions/9.5.1/providers/virtualbox.box>
==> homestead: Box download is resuming from prior download progress
Progress: 0% (Rate: 0*/s, Estimated time remaining: --:--:--)^Z

但我们vagrant box list却又存在这个box

jimschenchen@Chenyues-MBP Downloads % vagrant box list
laravel/homestead (virtualbox, 10.0.0)

我们看到Box Version: ~> 9.5.0限制了box的版本

查阅了官方文件

Box Versioning | Vagrant by HashiCorp

只需要在当前Vagrantfile下添加

config.vm.box_version = ">=0"
# 不要加在main scope外
jimschenchen

jimschenchen

Share

Leave a Reply