不能安装stream浪箱Laravel Homestead

我正在尝试在Mac OS X上安装Laravel Homestead,其中包含官方文档说明。

我安装了VirtualBox和Vagrant。 现在我试图添加命令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 

重试后:

 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. 

任何帮助表示赞赏。

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

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

编辑:添加下面的评论的第二个答案。)

尝试这个:
rm ~/.vagrant.d/tmp/*
然后再次vagrant up

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

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

stream浪者箱子增加laravel /宅基地

这就是享受……

尝试:

 vagrant box add laravel/homestead -c 

如果您使用的是Vagrant V2,那么您可以在添加一个框时使用--clean标志。

 vagrant box add laravel/homestead --clean 

--clean – 如果有的话,Vagrant会删除之前下载相同URL的旧临时文件。 如果你不想让stream浪者从前一点恢复下载,这可能是因为内容改变了。

stream浪文档

我也有同样的问题,我刚刚去

首页 – > .vagrant.d – > tmp

现在在这里有一个zip文件将在那里,请删除那一个,你的完成。

types

 cd ~ 

然后键入

 rm -rf .vagrant.d 

这应该完成。

我在~/.vagrant.d/data/machine-index解决了这个编辑~/.vagrant.d/data/machine-index文件的问题。删除"machines": {...}这个关键machines的值"machines": {...}"machines":{}

要下载文件,您必须在URL中添加版本和提供者。 例如下载precise64首先你需要它的URL是https://atlas.hashicorp.com/ubuntu/boxes/trusty64

那么你必须在之后添加版本和提供者,我们的例子是下载URL。

https://atlas.hashicorp.com/ubuntu/boxes/trusty64/versions/14.04/providers/virtualbox.box

那么你必须从你的stream浪文件中本地添加它。

要将其本地添加到stream浪文件,请使用以下命令

 vagrant box add foo-box /path/to/vagrant-box.box vagrant init foo-box vagrant up 

这将创buildvagrantfile,你可以configurationvagrant文​​件。

在最终完成之前,我只是简单地重新开始了这个过程。 我认为主要的问题是互联网连接,在我的家里,这是困难的。 最清洁的方式当然是别人已经build议的,再加上移动到一个稳定的连接。

这是一个存储库问题,有时取决于stream浪的版本。 更新stream浪者可以工作,但如果问题仍然存在,你必须尝试使用​​存档的stream浪汉版本。

Interesting Posts