命令'vagrant box add'失败

kus*_*uya 30 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]
Run Code Online (Sandbox Code Playgroud)

然后,我输入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
Run Code Online (Sandbox Code Playgroud)

如何安装流浪盒?

Emy*_*myl 42

vagrant box add由于Vagrant Cloud的引入,子命令的语法随版本1.5而更改.

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

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

vagrant box add precise32 http://files.vagrantup.com/precise32.box
Run Code Online (Sandbox Code Playgroud)