Homestead won’t update – Vagrant: An error occurred while downloading the remote file

Daniel KoopUncategorizedLeave a Comment

Sometimes I have problems with updating Homestead because the download is interrupted and you get the error “An error occurred while downloading the remote file”. This is the full error I have:

homestead update
 ==> default: Checking for updates to 'laravel/homestead'
 default: Latest installed version: 0.4.0
 default: Version constraints:
 default: Provider: virtualbox
 ==> default: Updating 'laravel/homestead' with provider 'virtualbox' from version
 ==> default: '0.4.0' to '0.4.1'...
 ==> default: Loading metadata for box 'https://atlas.hashicorp.com/laravel/homestead'
 ==> default: Adding box 'laravel/homestead' (v0.4.1) for provider: virtualbox
 default: Downloading: https://atlas.hashicorp.com/laravel/boxes/homestead/versions/0.4.1/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.
SSL read: error:00000000:lib(0):func(0):reason(0), errno 60
 Daniels-MacBook-Pro:~ danielkoop$ homestead update
 ==> default: Checking for updates to 'laravel/homestead'
 default: Latest installed version: 0.4.0
 default: Version constraints:
 default: Provider: virtualbox
 ==> default: Updating 'laravel/homestead' with provider 'virtualbox' from version
 ==> default: '0.4.0' to '0.4.1'...
 ==> default: Loading metadata for box 'https://atlas.hashicorp.com/laravel/homestead'
 ==> default: Adding box 'laravel/homestead' (v0.4.1) for provider: virtualbox
 default: Downloading: https://atlas.hashicorp.com/laravel/boxes/homestead/versions/0.4.1/providers/virtualbox.box
 ==> default: 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.

 

This happens when you want to resume the download. Unfortunately, Hashicorp does not support resuming downloads. Instead, you have to delete the already downloaded box.

Solution

Vagrant stores the temporarily downloads in ~/.vagrant.d/tmp. You can solve the problem by running the following command:

rm -rf ~/.vagrant.d/tmp/box*

This command will remove any interrupted downloads. Do not worry, the tmp folders means temporarily and this command will not remove already in use boxes.