命令' vagrant box add'失败

时间:2014-04-25 10:02:46

标签: vagrant

vagrantup.com表示输入vagrant box add hashicorp/precise32

但是当我输入时,终端会输出错误消息:

This command was not invoked properly. The help for this command is
available below.

Usage: vagrant box add <name> <url> [--provider provider] [-h]

然后,我输入vagrant box add hashicorp/precise32 \ http://files.vagrantup.com/hashicorp/precise32.box
但下载失败,并显示以下错误消息。

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

如何安装流浪盒?

1 个答案:

答案 0 :(得分:42)

由于Vagrant Cloud介绍,vagrant box add子命令的语法随版本1.5而更改。

从输出消息来看,您似乎使用的是旧版本,因此当前的文档对您的案例来说并不可靠。

Here您可以找到旧文档的快照,无论如何您需要使用的语法如下:

vagrant box add precise32 http://files.vagrantup.com/precise32.box