【发布时间】:2018-03-21 10:40:22
【问题描述】:
我刚刚遇到Vagrant,正在尝试通过入门说明https://www.vagrantup.com/intro/getting-started/index.html
在开始您的第一个项目之前,请安装最新版本的 Vagrant。由于我们将使用 VirtualBox 作为入门指南的提供者,因此请同时安装它。
我的主机是Windows 7 x64。 Virtualbox 是 5.1.14r112924。虚拟化已启用:我成功使用 Windows XP 虚拟机。
所以我安装了最新的Vagrant 版本2.0.0。我将Powershell 从2.0 更新为5.0 以修复vagrant up 没有任何问题。
所以,入门指南:
-
vagrant init hashicorp/precise64:好的,文件Vagrantfile出现了; -
vagrant up,入门说:
运行上述两个命令后,您将在 VirtualBox 中拥有一个运行 Ubuntu 12.04 LTS 64 位的完全运行的虚拟机。
但我明白了:
E:\VM\v_demo>vagrant up
Bringing machine 'default' up with 'virtualbox' provider...
==> default: Box 'hashicorp/precise64' could not be found. Attempting to find and install...
default: Box Provider: virtualbox
default: Box Version: >= 0
The box 'hashicorp/precise64' could not be found or
could not be accessed in the remote catalog. If this is a private
box on HashiCorp's Vagrant Cloud, 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://vagrantcloud.com/hashicorp/precise64"]
Error: error setting certificate verify locations:
CAfile: /mingw64/ssl/certs/ca-bundle.crt
CApath: none
在我的工作文件夹中的以下文件树:
| Vagrantfile
|
\---.vagrant
\---machines
\---default
\---virtualbox
vagrant_cwd
此错误的 Internet 搜索显示有关 curl и git 的结果,但此处未使用它们。
关于从错误消息中尝试vagrant login 的建议也不清楚。正如https://www.vagrantup.com/docs/cli/login.html 所说的
命令:vagrant login
login 命令用于向 HashiCorp 的 Vagrant 进行身份验证 云服务器。仅当您访问受保护时才需要记录 框或使用 Vagrant Share。
登录不是使用 Vagrant 的必要条件。绝大多数 Vagrant 不需要登录。只有某些功能,例如 受保护的盒子或 Vagrant Share 需要登录。
我不认为该测试示例是私有的。
而且我在任何地方都找不到Create account 按钮。
我错过了什么?
UPD
Vagrantfile
Vagrant.configure("2") do |config|
config.vm.box = "hashicorp/precise64"
config.vm.box_download_insecure = true
end
值 config.vm.box_download_insecure = true 没有帮助:结果相同。
UPD2
我找到了如何创建帐户https://app.vagrantup.com/account/new(在我使用移动版之前)。
vagrant login 没有帮助:同样的结果
【问题讨论】:
-
尝试在你的 vagrantfile 中添加
config.vm.box_download_insecure = true -
@FrédéricHenri,没有帮助,同样的结果。
-
curl/wget 用于下载盒子,可以运行
curl -O https://hashicorp-files.hashicorp.com/precise64.box下载盒子 -
@FrédéricHenri,
curl/wget真的用于Windows 7x64吗?我想只适用于Linux机器。我直接从https://hashicorp-files.hashicorp.com/precise64.box链接下载它。需要时间下载并探索如何从文件中vagrant up。 -
vagrant 仍然需要一种方法来下载机器,即使是 Windows,他们在内部使用 curl
标签: windows windows-7 vagrant vagrant-windows