Last login: Sat Jan 23 14:35:58 on consoleduncandeMini:~ duncan$ cd HHexo.rar Homestead/ duncandeMini:~ duncan$ cd Homestead/duncandeMini:Homestead duncan$ vagrant 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.4.0==> default: Loading metadata for box 'laravel/homestead' default: URL: https://atlas.hashicorp.com/laravel/homestead==> default: Adding box 'laravel/homestead' (v0.4.0) for provider: virtualbox default: Downloading: https://atlas.hashicorp.com/laravel/boxes/homestead/versions/0.4.0/providers/virtualbox.box==> default: Box download is resuming from prior download progressAn error occurred while downloading the remote file. The errormessage, if any, is reproduced below. Please fix this error and tryagain.HTTP server doesn't seem to support byte ranges. Cannot resume.duncandeMini:Homestead duncan$ vagrant box listlaravel/homestead (virtualbox, 0)duncandeMini:Homestead duncan$
我已經wget box回來了,在本地vagrant box add完畢。
然後根據laravel的文檔中說的配置好了Homestead,在Homestead下面執行vagrant up出現了這個問題:
無法讀取已經添加的box。
然後查了一下,說先要 vagrant init 一下,接著出現:
duncandeMini:Homestead duncan$ vagrant upBringing machine 'default' up with 'virtualbox' provider...==> default: Importing base box 'laravel/homestead'...==> default: Matching MAC address for NAT networking...==> default: Setting the name of the VM: Homestead_default_1453532161980_94944==> default: Clearing any previously set network interfaces...==> default: Preparing network interfaces based on configuration... default: Adapter 1: nat==> default: Forwarding ports... default: 22 => 2222 (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: Warning: Connection timeout. Retrying... default: default: Vagrant insecure key detected. Vagrant will automatically replace default: this with a newly generated keypair for better security. default: default: Inserting generated public key within guest... default: Removing insecure key from the guest if it's present... default: Key inserted! Disconnecting and reconnecting using new SSH key...==> default: Machine booted and ready!==> default: Checking for guest additions in VM...==> default: Mounting shared folders... default: /vagrant => /Users/duncan/HomesteadduncandeMini:Homestead duncan$
分析了一下,對比了一下Vagrantfile,發現沒有init前是包含過了 .homestead/Homestead.yaml的相關配置
而init後貌似木有描述到這個配置了?但是指定了本地box不再去網路上擷取
我猜測是這裡配置出問題了,試著自己把兩個配置結合在一起,然後再去vagrant up,但是一直出錯,實在不知道如何設定了,所以來當一把伸手黨,請教一下用vagrant做開發環境的大神們。
請問如何才能解決這個問題呢?
windows 和 osx 上都出現了這個問題
附加上Homestead.yaml的內容:
ip: "192.168.10.10"memory: 2048cpus: 1provider: virtualboxauthorize: ~/.ssh/id_rsa.pubkeys: - ~/.ssh/id_rsafolders: - map: ~/Code to: /home/wwwsites: - map: homestead.app to: /home/vagrant/www/publicdatabases: - homestead# blackfire:# - id: foo# token: bar# client-id: foo# client-token: bar# ports:# - send: 50000# to: 5000# - send: 7777# to: 777# protocol: udp
回複內容:
Last login: Sat Jan 23 14:35:58 on consoleduncandeMini:~ duncan$ cd HHexo.rar Homestead/ duncandeMini:~ duncan$ cd Homestead/duncandeMini:Homestead duncan$ vagrant 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.4.0==> default: Loading metadata for box 'laravel/homestead' default: URL: https://atlas.hashicorp.com/laravel/homestead==> default: Adding box 'laravel/homestead' (v0.4.0) for provider: virtualbox default: Downloading: https://atlas.hashicorp.com/laravel/boxes/homestead/versions/0.4.0/providers/virtualbox.box==> default: Box download is resuming from prior download progressAn error occurred while downloading the remote file. The errormessage, if any, is reproduced below. Please fix this error and tryagain.HTTP server doesn't seem to support byte ranges. Cannot resume.duncandeMini:Homestead duncan$ vagrant box listlaravel/homestead (virtualbox, 0)duncandeMini:Homestead duncan$
我已經wget box回來了,在本地vagrant box add完畢。
然後根據laravel的文檔中說的配置好了Homestead,在Homestead下面執行vagrant up出現了這個問題:
無法讀取已經添加的box。
然後查了一下,說先要 vagrant init 一下,接著出現:
duncandeMini:Homestead duncan$ vagrant upBringing machine 'default' up with 'virtualbox' provider...==> default: Importing base box 'laravel/homestead'...==> default: Matching MAC address for NAT networking...==> default: Setting the name of the VM: Homestead_default_1453532161980_94944==> default: Clearing any previously set network interfaces...==> default: Preparing network interfaces based on configuration... default: Adapter 1: nat==> default: Forwarding ports... default: 22 => 2222 (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: Warning: Connection timeout. Retrying... default: default: Vagrant insecure key detected. Vagrant will automatically replace default: this with a newly generated keypair for better security. default: default: Inserting generated public key within guest... default: Removing insecure key from the guest if it's present... default: Key inserted! Disconnecting and reconnecting using new SSH key...==> default: Machine booted and ready!==> default: Checking for guest additions in VM...==> default: Mounting shared folders... default: /vagrant => /Users/duncan/HomesteadduncandeMini:Homestead duncan$
分析了一下,對比了一下Vagrantfile,發現沒有init前是包含過了 .homestead/Homestead.yaml的相關配置
而init後貌似木有描述到這個配置了?但是指定了本地box不再去網路上擷取
我猜測是這裡配置出問題了,試著自己把兩個配置結合在一起,然後再去vagrant up,但是一直出錯,實在不知道如何設定了,所以來當一把伸手黨,請教一下用vagrant做開發環境的大神們。
請問如何才能解決這個問題呢?
windows 和 osx 上都出現了這個問題
附加上Homestead.yaml的內容:
ip: "192.168.10.10"memory: 2048cpus: 1provider: virtualboxauthorize: ~/.ssh/id_rsa.pubkeys: - ~/.ssh/id_rsafolders: - map: ~/Code to: /home/wwwsites: - map: homestead.app to: /home/vagrant/www/publicdatabases: - homestead# blackfire:# - id: foo# token: bar# client-id: foo# client-token: bar# ports:# - send: 50000# to: 5000# - send: 7777# to: 777# protocol: udp
搞掂了。 這個問題是因為Homestead更新為最新版本為0.4.0了。
原因:
用wget下載回來的virtualbox.box
雖然是0.4
的,但是在vagrant box list
中顯示為 0
在下載回來的homestead預設的配置中就會出現錯誤。
方法:
在clone
回來的Homestead\scripts\
檔案夾中,開啟homestead.rb
檔案
把
config.vm.box_version = settings["version"] ||= ">= 0.4.0"
改為
config.vm.box_version = settings["version"] ||= ">= 0"
我看你這裡已經正常開啟了呀 不知道可不可以把報錯資訊po一下
我也遇到這個問題了,搞了兩天,看到你這裡,才解決,真是太感謝了,謝謝分享!