Vagrant错误 "找不到'hashicorp/precise32'盒子..." Windows 10下载器退出状态3221225781

11

我在Windows 10上遇到了这个错误:

The box 'hashicorp/precise32' could not be found or
could not be accessed in the remote catalog. If this is a private
box on HashiCorp's Atlas, please verify you're logged in via
`vagrant login`. Also, please double-check the name. The expanded
URL and error message are shown below:

URL: ["https://atlas.hashicorp.com/hashicorp/precise32"]
Error:
请注意,该问题没有详细的错误信息,这使其与其他已发布的类似问题不同。它也有一个不同的解决方案。
2个回答

17

在Windows 10上运行vagrant 1.8.1时,出现了缺少依赖项的问题。我在Windows命令行“cmd.exe”和git-bash下遇到了这个问题。此问题也已经在mitchellh/vagrant GitHub存储库中报告并关闭,具体见"On Windows 10, "vagrant up" and "vagrant box add" throw blank errors #6852"

我和其他人根据jeremywhittington在问题#6754中的建议,通过安装"Microsoft Visual C++ 2010 SP1 Redistributable Package (x86)"解决了此问题。

"vagrant --debug add hashicorp/precise32"输出的相关片段显示,“curl”以不传播到标准vagrant输出的奇怪代码退出:

...
INFO subprocess: Starting process: ["C:\\HashiCorp\\Vagrant\\embedded\\bin/curl.EXE", "-I", "-q", "--fail", "--location", "--max-redirs", "10", "--user-agent", "Vagrant/1.8.1 (+https://www.vagrantup.com; ruby2.2.3)", "--continue-at", "-", "-H", "Accept:application/json", "https://atlas.hashicorp.com/hashicorp/precise32"]
DEBUG subprocess: Selecting on IO
DEBUG subprocess: Waiting for process to exit. Remaining to timeout: 32000
DEBUG subprocess: Exit status: 3221225781
 WARN downloader: Downloader exit code: 3221225781
ERROR warden: Error occurred: The box 'hashicorp/precise32' could not be found or
could not be accessed in the remote catalog. If this is a private
box on HashiCorp's Atlas, please verify you're logged in via
`vagrant login`. Also, please double-check the name. The expanded
URL and error message are shown below:

URL: ["https://atlas.hashicorp.com/hashicorp/precise32"]
Error:
...

这在Windows 8.1上也适用;问题#6725:使用“box add”添加本地框失败v1.8.0,成功v1.7.4似乎是相关问题。 - zpea
在使用win 8.1和vagrant 1.8.4时,只需安装https://www.microsoft.com/en-us/download/details.aspx?id=8328即可解决我的问题。 - WaQaR Ali
这对我在全新安装的Windows 10上解决了问题。 - Matt Kaye

0

我的理解是,Vagrant默认安装的CURL版本会与Windows 10发生冲突。

我通过以下方式解决了这个问题:

1)下载一个新的CURL:

[https://sourceforge.net/projects/curlforwindows/?source=typ_redirect]

2) 将文件夹提取到c:/

例如:C:/curl-7.4.0/

3) 找到vagrant文件夹 C:\HashiCorp\Vagrant\embedded\bin

4) 将文件curl.exe重命名为curl.exe_或删除。

5) 将c:/curl-7.4.0/添加到{PATH}变量中。

6) 打开提示符并测试命令“curl --help”

7) 再次运行“vagrant up”命令,然后就可以愉快地使用了 :)


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