php - 已经安装'laravel/homestead' box,但是执行homestead up时提示找不到box,怎么办?
本文介绍了php - 已经安装'laravel/homestead' box,但是执行homestead up时提示找不到box,怎么办?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
问 题
已经安装'laravel/homestead' box (0.4.1),但是执行homestead up时提示找不到box,还自动要下载0.3.0版本的box。怎么办?
代码如下:
➜ ~ homestead up
Bringing machine 'default' up with 'virtualbox' provider...
==> default: Box 'laravel/homestead' could not be found. Attempting to find and install...
default: Box Provider: virtualbox
default: Box Version: <= 0.3.0
已安装:
➜ ~ vagrant box list
laravel/homestead (virtualbox, 0.4.1)
vagrant up可以正常启动
➜ ~ vagrant up
Bringing machine 'default' up with 'virtualbox' provider...
==> default: Checking if box 'laravel/homestead' is up to date...
==> default: Clearing any previously set forwarded ports...
==> default: Clearing any previously set network interfaces...
==> default: Preparing network interfaces based on configuration...
default: Adapter 1: nat
==> default: Forwarding ports...
default: 22 (guest) => 2222 (host) (adapter 1)
==> default: Booting VM...
==> default: Waiting for machine to boot. This may take a few minutes...
default: SSH address: 127.0.0.1:2222
default: SSH username: vagrant
default: SSH auth method: private key
==> default: Machine booted and ready!
==> default: Checking for guest additions in VM...
==> default: Mounting shared folders...
default: /vagrant => /Users/zyy
==> default: Machine already provisioned. Run `vagrant provision` or use the `--provision`
==> default: flag to force provisioning. Provisioners marked to run always will still run.
解决方案
打开homestead.rb文件 把 config.vm.box_version = settings["version"] ||= ">= 0.4.0"
改为 config.vm.box_version = settings["version"] ||= ">= 0"
这篇关于php - 已经安装'laravel/homestead' box,但是执行homestead up时提示找不到box,怎么办?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文