安装 Homestead Vagrant Box 时出现问题

Problem while Installing The Homestead Vagrant Box

我正在使用 ubuntu 14.04,我正在尝试设置 larave/Homestead。但是在安装 Homestead Vagrant Box 时我在中间失去了互联网连接,后来我尝试使用 '$ vagrant box add laravel/homestead' 重新安装它 命令行,但重装时提示如下错误

1) virtualbox
2) vmware_desktop

Enter your choice: 1
==> box: Adding box 'laravel/homestead' (v0.3.3) for provider: virtualbox
    box: Downloading: https://atlas.hashicorp.com/laravel/boxes/homestead/versions/0.3.3/providers/virtualbox.box
==> box: Box download is resuming from prior download progress
An error occurred while downloading the remote file. The error
message, if any, is reproduced below. Please fix this error and try
again.

HTTP server doesn't seem to support byte ranges. Cannot resume.

我尝试重新安装 vagrant,但这没有用。

您需要清除 Vagrant 生成的临时文件。

这可以通过三种方式实现:

  1. 强制全新安装

    添加一个参数--clean这样$ vagrant box add laravel/homestead --clean

  2. 手动删除

    手动导航到 vagrants 临时文件夹,方法是点击 cmd+space 并键入 ~/.vagrant.d/tmp/,然后删除那里的文件。

  3. 航站楼

    打开终端,删除生成的临时文件 流浪汉:

    rm ~/.vagrant.d/tmp/*
    

感谢@Nicklas 的快速回复。但我解决了它在末尾添加'-c'标志。

$ vagrant box add laravel/homestead -c

这删除了在 .vagrant 中分配的与其关联的文件。d/tmp/

最简单的选择是强制安装程序清理旧文件,因此您只需要使用此命令

$ vagrant box add laravel/homestead --clean

source