Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Vagrant, can't download box

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.
like image 582
Ahmed-Anas Avatar asked Dec 25 '15 14:12

Ahmed-Anas


People also ask

How do I download a vagrant box?

If you have not added a box yet, do so now. Vagrant will prompt you to select a provider. Type 2 and press Enter to select Virtualbox. This will download the box named hashicorp/bionic64 from HashiCorp's Vagrant Cloud box catalog, where you can find and host boxes.

How do I completely remove vagrant box?

Simply remove the ~/. vagrant. d directory to delete the user data. If on Windows, this directory is located at C:\Users\YourUsername\.

Where is Vagrantfile located?

Vagrantfile in your Vagrant home directory (defaults to ~/. vagrant. d ). This lets you specify some defaults for your system user.

How do I update my vagrant box?

Command: vagrant box update This command updates the box for the current Vagrant environment if there are updates available. The command can also update a specific box (outside of an active Vagrant environment), by specifying the --box flag. Note that updating the box will not update an already-running Vagrant machine.


1 Answers

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.

like image 155
Michael D Johnson Avatar answered Dec 18 '22 06:12

Michael D Johnson