已經安裝'laravel/homestead' box,但是執行homestead up時提示找不到box,怎麼辦?

來源:互聯網
上載者:User
已經安裝'laravel/homestead' box (0.4.1),但是執行homestead up時提示找不到box,還自動要下載0.3.0版本的box。怎麼辦?

代碼如下:

➜  ~ homestead upBringing 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 listlaravel/homestead (virtualbox, 0.4.1)

vagrant up可以正常啟動

➜  ~ vagrant upBringing 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.

回複內容:

已經安裝'laravel/homestead' box (0.4.1),但是執行homestead up時提示找不到box,還自動要下載0.3.0版本的box。怎麼辦?

代碼如下:

➜  ~ homestead upBringing 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 listlaravel/homestead (virtualbox, 0.4.1)

vagrant up可以正常啟動

➜  ~ vagrant upBringing 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"

Homestead\scripts\檔案夾中,開啟homestead.rb檔案

修改config.vm.box_version = settings["version"] ||= ">= 0.4.0"

  • 相關文章

    聯繫我們

    該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

    如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

    A Free Trial That Lets You Build Big!

    Start building with 50+ products and up to 12 months usage for Elastic Compute Service

    • Sales Support

      1 on 1 presale consultation

    • After-Sales Support

      24/7 Technical Support 6 Free Tickets per Quarter Faster Response

    • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.