Vagrant box 找不到错误

问题描述 投票:0回答:3

我正在尝试使用虚拟盒设置虚拟机。我已经在我的 Windows 7 64 位机器上安装了 Virtual Box 和 vagrant。我还使用puphpet搭建了一个环境。但每当我尝试安装盒子 ubuntu1404-x64 时,它都会抛出错误

Bringing machine 'machine1' up with 'virtualbox' provider...
==>Machine1: Box 'puphpet/ubuntu1404-x64' could not be found. Attempting to find and install...
machine1: Box Provider: virtualbox
machine1: Box Version: >= 0
machine1: Box file was not detected as metadata. Adding it directly...
machine1: Adding box 'puphpet/ubuntu1404-x64' (v0) for provider: virtualbox
machine1: Downloading: puphpet/boxes/ubuntu1404-x64
machine1:
An error occurred while downloading the remote file. The error message, if any, is reproduced below. Please fix this error and try again.

我检查了 URL https://atlas.hashicorp.com/puphpet/boxes/ubuntu1404-x64/ 并且 puphpet/ubuntu1404-x64 框确实存在。

此外,当它显示

The error message, if any, is reproduced below
时,它不会在终端上显示任何描述。

我用谷歌搜索了这个问题,尝试了 stackoverflow 上的一些答案,但没有结果。请帮忙。

vagrant virtual-machine virtualbox vagrantfile puphpet
3个回答
8
投票

我过去也遇到过类似的情况,它帮助我使用 vagrant 命令行下载该框,而不是自动下载(从 Vagrantfile 中的 URL):

$ vagrant box add USER/BOX

查看更多这里。你能尝试同样的方法吗?它可能也适合你。

编辑:在 Windows 盒子上,Microsoft Visual C++ 2010 redist 似乎需要执行盒子的配置。可以在这里下载。有关 Puhpet 问题的更多信息:此处


3
投票

我遇到了类似的问题,并通过安装最新版本的 vagrant 修复了它。


0
投票

它一直告诉我:吊销功能无法检查证书的吊销情况

我搜索了它并在此回购聊天中发现了相同的错误:

https://github.com/hashicorp/vagrant/issues/13102

解决方案(至少对我来说)是将这一行添加到 vagrant 文件中: 在它开始的行: Vagrant.configure("2") do |config|

在其下方添加以下行:config.vm.box_download_options = {"ssl-no-revoke" => true}

所以最终的形式应该是:

Vagrant.configure("2") do |config|
    // leave any already written lines as it is 

    config.vm.box_download_options = {"ssl-no-revoke" => true}  

然后保存文件

它对我有用并完成了下载

注意:此解决方案可能会给您的计算机带来微小的安全问题,因为它在下载虚拟机的基础框映像期间有效地禁用了 SSL 证书吊销检查,但我发布此解决方案是因为这是我个人发现的唯一方法帮助我解决这个问题。

© www.soinside.com 2019 - 2024. All rights reserved.