Vagrant, can't download box
Asked Answered
M

7

6

not sure why I'm having this issue but I can't add vagrant boxes.

Using windows 10, tried on powershell and simple command prompt. same issue. It's a relatively fresh install of windows. Maybe I'm missing some required package?

first i tried this command:

vagrant box add hashicorp/precise32

and got the error:

The box 'hashicorp/precise32' 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/hashicorp/precise32"]
Error:

So I downloaded the box manually and tried this:

vagrant box add base64 file:///D:/downloads/vagrant_boxes/precise64.box

And got this error again:

==> box: Box file was not detected as metadata. Adding it directly...
==> box: Adding box 'base64' (v0) for provider:
    box: Unpacking necessary files from: file:///D:/downloads/vagrant_boxes/precise64.box
    box:
An error occurred while downloading the remote file. The error
message, if any, is reproduced below. Please fix this error and try
again.
Minaret answered 25/12, 2015 at 14:54 Comment(1)
which version of vagrant are you using ?Cellist
M
4

I was using vagrant v1.8.0 when this happened. Later that day vagrant v1.8.1 was released. I didn't try that, instead I shifted back to v1.7.4 and the issue was gone.

Minaret answered 1/1, 2016 at 10:1 Comment(1)
You're a life savior! Had the same problem thinking it could have something to do with me installing Vagrant in a folder with spaces. Reinstalled the app several times until stumbling across this which solved it!Constance
B
6

The libraries on current version (as of this date) OSX don't support the version of curl bundled with Vagrant 1.8.7. I installed 1.8.6 and everything worked like a champ. To test this theory:

cd /opt/vagrant/embedded/bin
./curl --help

If you get a 'normal' reply than you should be fine or there's something else wrong.

Baggott answered 23/11, 2016 at 6:2 Comment(0)
M
4

I was using vagrant v1.8.0 when this happened. Later that day vagrant v1.8.1 was released. I didn't try that, instead I shifted back to v1.7.4 and the issue was gone.

Minaret answered 1/1, 2016 at 10:1 Comment(1)
You're a life savior! Had the same problem thinking it could have something to do with me installing Vagrant in a folder with spaces. Reinstalled the app several times until stumbling across this which solved it!Constance
I
4

I've been resolving this issue since I installed vagrant 1.8.1, I tried to installed lower version but i came up with the same problem. Hopefully, I solve it here:

first make sure you installed Microsoft Visual C++ 2010 SP1 Redistributable. here is for 64bit https://www.microsoft.com/en-us/download/details.aspx?id=13523 next, download ssl version of curl in my case 64bit also. here: https://curl.haxx.se/latest.cgi?curl=win64-ssl-sspi

now extract the curl.exe to C:\Vagrant\embedded\bin. please see your installation directory.

and then done. if your not using ssl try the no-ssl version of curl. hope helps

Impregnate answered 26/2, 2016 at 9:51 Comment(2)
Was looking for a solution whole day. Only your advice helped!Eponymous
Just replacing vagrant's curl with the official SSL version solved my problem. Thanks :)Millenarian
B
1

Check the C: \ HashiCorp \ Vagrant \ embedded \ bin \ curl.exe case give an error, there is your problem.

To solve, just download gitbash, console2, cmder, etc ... you have curl installed, or try http://www.confusedbycode.com/curl/.

however strongly recommend gitbash or cmder

Benilda answered 5/1, 2016 at 0:44 Comment(0)
I
1

https://atlas.hashicorp.com/hashicorp/boxes/precise32 base on the offical URL.. there is only virutal box provider. try below command: vagrant init hashicorp/precise32; vagrant up --provider virtualbox

Inventory answered 29/2, 2016 at 17:2 Comment(0)
I
0

For MacOS users whom reinstalling new version of vagrant doesn't help:

sudo mv /opt/vagrant/embedded/lib/libiconv.2.dylib /opt/vagrant/embedded/lib/libiconv.2.dylib_
brew install libiconv
brew link --force libiconv

credits to: https://github.com/mitchellh/vagrant/issues/5782

Introduce answered 13/11, 2016 at 13:27 Comment(0)
M
-1

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

vagrant init hashicorp/precise32
vagrant up
vagrant ssh

Hope it will be added in boxes list automatically. If you want to set up local box - add it getting few steps:

D:
cd downloads/vagrant_boxes
vagrant box add base64 precise64.box
vagrant up
vagrant ssh
Meuse answered 1/1, 2016 at 10:16 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.