Vagrant:错误:无法解析主机:(nil);找不到主机

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

我在尝试使用 vagrant 和 VirtualBox 创建虚拟机时收到“无法解析主机”错误。我按照 http://docs.vagrantup.com/v2/getting-started/

的说明进行操作

执行了以下2条命令

  1. vagrant init hashicorp/precise32

  2. 流浪起来

以下是错误消息。

C:\Users\xyz123>vagrant up 将机器“默认”启动 “虚拟盒”提供商... ==> 默认:找不到框“ubuntu/trusty32”。试图找到并安装... 默认:Box 提供商:virtualbox 默认值:Box 版本:>= 0 无法在远程目录中找到或无法访问 Box 'ubuntu/trusty32'。如果这是一个 HashiCorp Atlas 上的私人邮箱,请验证您已通过以下方式登录

vagrant login
。另外,请仔细检查姓名。扩展后的网址 和错误信息如下所示:

URL:[“https://atlas.hashicorp.com/ubuntu/trusty32”]错误:无法 解析主机:(无);找不到主机

感谢所有帮助

windows vagrant virtualbox
4个回答
0
投票

以下命令解决了我在 Mac 上使用 vagrant 1.7.2 的问题

brew install curl
export DYLD_INSERT_LIBRARIES=

0
投票

取消 Vagrantfile 中以下行的注释..

config.vm.box_check_update = false

来源:https://github.com/mitchellh/vagrant/issues/3391


0
投票

设置代理命令对我有用

export https_proxy=http://username:password@proxy_ip:proxy_port

然后

$ vagrant up
Bringing machine 'default' up with 'virtualbox' provider...
==> default: Box 'ubuntu/trusty64' could not be found. Attempting to find and install...
    default: Box Provider: virtualbox
    default: Box Version: >= 0
==> default: Loading metadata for box 'ubuntu/trusty64'
    default: URL: https://atlas.hashicorp.com/ubuntu/trusty64
==> default: Adding box 'ubuntu/trusty64' (v20170202.0.0) for provider: virtualbox
    default: Downloading: https://atlas.hashicorp.com/ubuntu/boxes/trusty64/versions/20170202.0.0/providers/virtualbox.box
    default: Progress: 8% (Rate: 302k/s, Estimated time remaining: 0:26:21)

0
投票

你正在一个盒子里调用一个盒子,你不需要再次初始化,只需流浪,你需要重新开始

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