在Ubuntu终端执行“vagrant up”时,出现了“找不到盒子'hashicorp/precise32'”的错误提示。

9

我已经安装了Vagrant,一旦我进入终端中的项目文件夹,我会执行以下命令:

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

输出结果:

[vagrant] Downloading with Vagrant::Downloaders::HTTP... 
[vagrant] Downloading box: files.vagrantup.com/precise32.box 
[vagrant] Downloading box: hashicorp-files.vagrantup.com/precise32.box 
[vagrant] Extracting box... 
[vagrant] Verifying box... 
[vagrant] Cleaning up downloaded box...
  1. vagrant init hashicorp/precise32

输出:一个Vagrantfile文件已被放置在当前目录下

  1. vagrant up

我收到了一个错误提示:

The box 'hashicorp/precise32' could not be found

每个命令都成功执行了吗? - Biffen
第一条命令成功了,终端显示[vagrant]使用Vagrant::Downloaders::HTTP下载中... [vagrant] 正在下载box: http://files.vagrantup.com/precise32.box [vagrant] 正在下载box: http://hashicorp-files.vagrantup.com/precise32.box [vagrant] 正在解压box... [vagrant] 正在验证box... [vagrant] 清理已下载的box... 第二条命令也成功了,并说一个Vagrantfile已经放置在这个目录中。现在你可以准备好vagrant up你的第一个虚拟环境了。我在第三步之后遇到了错误。 - Bhavika
请使用更新版本的vagrant再次运行,命令为'vagrant up --debug'。这个问题可能会通过#5016#5231得到解决。 - michaelbahr
2个回答

3
你所需要做的就是编辑你的 vagrant 文件,按照如下方式定义 vm.box_url 和 vm.box 选项。
config.vm.box_url = "http://files.vagrantup.com/precise32.box" config.vm.box = "precise32"
然后运行 "vagrant up" 即可。

1

2
这是基于问题的任何洞见,还是只是一个“关闭并重新打开”建议? - Oddthinking

网页内容由stack overflow 提供, 点击上面的
可以查看英文原文,
原文链接