配置Laravel Homestead Vagrant box add时提示Gzip出错


按照教程配置Homestead,在运行 vagrant box add 命令时输入:


 vagrant box add laravel/homestead virtualbox.box

提示如下:

==> box: Box file was not detected as metadata. Adding it directly...
==> box: Adding box 'laravel/homestead' (v0) for provider:

 
  box: Unpacking necessary files from: file:///vagrant/homestead/virtualbox.box The box
 

failed to unpackage properly. Please verify that the box file you're
trying to add is not corrupted and try again. The output from
attempting to unpackage (if any):

x ./box-disk1.vmdk: gzip decompression failed
bsdtar: Error exit delayed from previous errors.

重点是红色部分的错误提示,目前猜测是

  1. Vagrant、VirtualBox和Box文件的版本不兼容造成?

  2. box镜像文件的问题?

  3. 权限问题?……

教程中说可以使用迅雷离线下载将box文件下载到本地后add,实测下了好多次都不行,通过wget或从原始文件下载那速度简直没法看……

我的Vagrant是1.7.4,VirtualBox是5.0.2,BOX文件是0.2.7版本

求解决思路或者问题原因。。感谢。

laravel gzip homestead vagrant

风神D青年 9 years, 4 months ago

呃,诡异的版本兼容问题。
用了Virtualbox 4.3.28 + 0.2.6版本的BOX文件就成功了,应该和Virtualbox版本关系不大,主要是BOX文件的版本。

德州電鋸殺豬狂 answered 9 years, 4 months ago

Your Answer