首页 文章

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

提问于
浏览
1

尝试使用vagrant和VirtualBox创建vm时,我收到"Could not resolve host"错误 . 我按照http://docs.vagrantup.com/v2/getting-started/的说明进行操作

执行以下2个命令

  • vagrant init hashicorp / precise32

  • 流浪汉

以下是错误消息 .

C:\ Users \ xyz123> vagrant up使用'virtualbox'提供程序将计算机'默认'打开... ==>默认:无法找到Box'ubuntu / trusty32' . 尝试查找和停止...默认:Box提供者:virtualbox默认值:Box版本:> = 0无法在远程目录中找到或无法访问“ubuntu / trusty32”框 . 如果这是HashiCorp的Atlas上的私人包装盒,请确认您是通过vagrant登录进行登录的 . 另外,请仔细检查名称 . 扩展的URL和错误消息如下所示:URL:[“https://atlas.hashicorp.com/ubuntu/trusty32”]错误:无法解析主机:(nil);主机未找到

所有的帮助表示赞赏

3 回答

  • 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)
    

相关问题