Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

command 'vagrant box add' fail

Tags:

vagrant

vagrantup.com says input vagrant box add hashicorp/precise32,

But when I input it, the terminal outputs error message:

This command was not invoked properly. The help for this command is available below.  Usage: vagrant box add <name> <url> [--provider provider] [-h] 

Then, I input vagrant box add hashicorp/precise32 \ http://files.vagrantup.com/hashicorp/precise32.box,
But the download fail, with following error message.

Download failed. Will try another box URL if there is one. An error occurred while downloading the remote file. The error message, if any, is reproduced below. Please fix this error and try again.  Couldn't open file /Users/XXXX/ http:/files.vagrantup.com/precise32.box 

How do I do to install vagrant box?

like image 264
kusumoto_teruya Avatar asked Apr 25 '14 10:04

kusumoto_teruya


People also ask

What is the command to destroy a vagrant box?

Command: vagrant destroy [name|id] This command stops the running machine Vagrant is managing and destroys all resources that were created during the machine creation process. After running this command, your computer should be left at a clean state, as if you never created the guest machine in the first place.

How do you run commands in vagrant?

If you run vagrant by itself, help will be displayed showing all available subcommands. In addition to this, you can run any Vagrant command with the -h flag to output help about that specific command. For example, try running vagrant init -h .

What is the command to start a vagrant box?

1 - Vagrant Init In this example, I want to create a very basic Vagrantfile based on a box used from Vagrant Cloud. To do this I simply run vagrant init with the box address. `vagrantup.com` for more information on using Vagrant. Just like that I have enough to boot up a Vagrant box on my local machine.


1 Answers

The syntax for the vagrant box add subcommand is changed with the version 1.5, due to the Vagrant Cloud introduction.

From the output messages it seems that you're using an older version, so current documentation is not reliable for your case.

Here you can find a snapshot of the old documentation, in any case the syntax you need to use is like the following:

vagrant box add precise32 http://files.vagrantup.com/precise32.box 
like image 64
Emyl Avatar answered Oct 06 '22 07:10

Emyl