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.
Ahmed-Anas
  • 5,471
  • 9
  • 50
  • 72

7 Answers7

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.

Michael D Johnson
  • 889
  • 1
  • 10
  • 21
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.

Ahmed-Anas
  • 5,471
  • 9
  • 50
  • 72
  • 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! – Niklas Ekman Jan 29 '16 at 10:52
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

J.Aries
  • 99
  • 7
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

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

gray13
  • 11
  • 1
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

ted
  • 5,219
  • 7
  • 36
  • 63
-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
cazorla19
  • 284
  • 3
  • 12