Vagrant box add fail

二次信任 提交于 2019-12-20 03:03:06

问题


I was trying to add

laravel/homestead

box in vagrant but i get different errors.

By running

vagrant box add laravel/homestead

I get this error

The box 'laravel/homestead' could not be found or could not be accessed in the remote catalog. If this is a private box on HashiCorp's Atlas, please verify you're logged in via `vagrant login`. Also, please double-check the name. The expanded URL and error message are shown below:

URL: ["https://atlas.hashicorp.com/laravel/homestead"] Error:

I tried to 'vagrant login' and i logged in successfully but still receiving same error.

I tried to download the box manually, However, I still having problems adding it.

by running this command

vagrant box add laravel/homestead [Path in Windows]

i get

==> box: Adding box 'laravel/homestead' (v0) for provider:
    box: Unpacking necessary files from: file://C:/Users/eNull/Downloads/hc-download
    box:
An error occurred while downloading the remote file. The error
message, if any, is reproduced below. Please fix this error and try
again.

My OS: Windows 10.

cUrl version: curl 7.45.0 (x86_64-w64-mingw32) libcurl/7.45.0 OpenSSL/1.0.2d zlib/1.2.8 libidn/1.32 libssh2/1.6.0 librtmp/2.3

vagrant: 1.8.1

VirtualBox: 5.0.12


回答1:


You don`t need to add the box from web. Init instead of this:

vagrant init laravel/homestead
vagrant up
vagrant ssh

Vagrant should add homestead in boxes list automatically. If you want to set up local downloaded box, you will be get better to add box directly from box directory.:

cd [path in windows]
vagrant box add [name_box] laravel/homestead
vagrant up
vagrant ssh



回答2:


Fixed.

I downloaded

cUrl x64 with SSL

and replace it with the curl.exe provided by Vagrant.

In other words, I copied the curl.exe to

C:\HashiCorp\Vagrant\embedded\bin

Now it's working perfect.




回答3:


vagrant box add laravel/homestead https://atlas.hashicorp.com/laravel/boxes/homestead


来源:https://stackoverflow.com/questions/34556929/vagrant-box-add-fail

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!