无法安装Vagrant box Laravel Homestead

Alo*_*ano 38 php terminal vagrant laravel homestead

我正在尝试按照此处的官方文档说明在Mac OS X上安装Laravel Homestead .

我安装了VirtualBox和Vagrant.现在我正在尝试使用命令添加Homestead框vagrant box add laravel/homestead.一段时间后下载停止,我收到一个错误.它不允许我恢复下载所以我必须删除部分下载文件并从零开始.我已经尝试过很多次了.

我认为我的互联网连接有一些事情要做,因为它有点慢,而且是一个大文件.

这是完整的代码:

$ vagrant box add laravel/homestead
==> box: Loading metadata for box 'laravel/homestead'
    box: URL: https://atlas.hashicorp.com/laravel/homestead
This box can work with multiple providers! The providers that it
can work with are listed below. Please review the list and choose
the provider you will be working with.

1) virtualbox
2) vmware_desktop

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

transfer closed with 935392411 bytes remaining to read
Run Code Online (Sandbox Code Playgroud)

重试后:

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.
Run Code Online (Sandbox Code Playgroud)

任何帮助表示赞赏.

Chr*_*ogt 68

A.转到.vagrant.d\tmp\并删除部分下载文件,然后重试.

B.如果失败,您可以尝试使用浏览器或其他工具手动下载文件.下载后,您可以使用导入它vagrant box add laravel/homestead path/to/virtualbox.box.

(编辑:在下面的评论中添加第二个答案.)

  • 嗯,您可以尝试使用浏览器或其他工具手动下载[文件](https://atlas.hashicorp.com/laravel/boxes/homestead/versions/0.2.7/providers/virtualbox.box).下载后,您可以使用`vagrant box add laravel/homestead path/to/virtualbox.box`导入它. (4认同)

Sor*_*ush 42

试试这个:
rm ~/.vagrant.d/tmp/*或者rm -R ~/.vagrant.d/tmp/*

然后vagrant up又来了.


Jun*_*ari 13

只需转到C:\ Users\YourUSERNAME\.vagrant.d\tmp

并删除所有文件,然后再次键入以下命令

流浪盒添加laravel /宅基地

多数民众赞成......


cod*_*ody 11

尝试:

vagrant box add laravel/homestead -c
Run Code Online (Sandbox Code Playgroud)

  • @ydobonebi标志'-c'的文档说明:"清除所有临时下载文件".在尝试添加框之前,使用此标志将删除与.vagrant.d/tmp /中的部分下载关联的文件.它在行为上等同于删除.vagrant.d/tmp目录的内容,然后重试添加该框. (5认同)

ske*_*hat 7

如果您正在使用Vagrant V2,则可以--clean在添加框时使用该标记.

vagrant box add laravel/homestead --clean
Run Code Online (Sandbox Code Playgroud)

--clean - 如果给出,Vagrant将删除先前下载相同URL的任何旧临时文件.如果您不希望Vagrant从上一点恢复下载,这可能是有用的,可能是因为内容已更改.

流浪文件