30
votes

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?

1

1 Answers

42
votes

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