这似乎是由于在 Windows 10 上运行 vagrant 1.8.1 时缺少依赖项引起的。它发生在 Windows 命令行“cmd.exe”和 git-bash 下。这也在 mitchellh/vagrant GitHub 存储库中被报告并关闭,因为“在 Windows 10 上,“vagrant up”和“vagrant box add”会抛出空白错误 #6852”
我和其他人通过安装jeremywhittington 在 issue #6754中建议的“ Microsoft Visual C++ 2010 SP1 Redistributable Package (x86) ”来解决这个问题。
“vagrant --debug add hashcorp/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:
...