Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Can't install Vagrant box Laravel Homestead

I'm trying to install Laravel Homestead on Mac OS X following the official documentation instructions on here.

I installed VirtualBox and Vagrant. Now I'm trying to add the Homestead box with the command vagrant box add laravel/homestead. After a while the download stops and I get an error. It doesn't let me restore the download so I have to delete the partial download file and start from zero. I've tried it many times.

I think my Internet connection has something to do since it's kinda slow and it's a large file.

Here's the complete code:

$ 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

After retrying:

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.

Any help is appreciated.

like image 558
Alonso Arellano Avatar asked Jun 28 '15 01:06

Alonso Arellano


3 Answers

A. Go to .vagrant.d\tmp\ and delete the partial download file, then try again.

B. If that fails, you could attempt downloading the file manually using a browser or other tool. Once downloaded, you can import it using vagrant box add laravel/homestead path/to/virtualbox.box.

(Edited: Adds second answer from comments below.)

like image 63
Chris Vogt Avatar answered Nov 16 '22 18:11

Chris Vogt


Try this:
rm ~/.vagrant.d/tmp/*or rm -R ~/.vagrant.d/tmp/*

Then vagrant up again.

like image 42
Soroush Avatar answered Nov 16 '22 19:11

Soroush


Go to C:\Users\YourUSERNAME\.vagrant.d\tmp and delete all the files. Then type following command:

vagrant box add laravel/homestead

like image 13
Juned Ansari Avatar answered Nov 16 '22 20:11

Juned Ansari