Mryqu's Notes


  • 首页

  • 搜索
close

遇到"vagrant up"无法读取box元数据问题

时间: 2016-03-18   |   分类: Tool   Vagrant     |   阅读: 155 字 ~1分钟

昨天在某个Windows Server2008上升级了Vagrant (1.8.1)和VitualBox(5.0.16),然后vagrant up就开始出问题了。

C:\foo>vagrant up
Bringing machine 'xfoo' up with 'virtualbox' provider...
==> xfoo: Box ‘foo-ubuntu‘ could not be found. Attempting to find and install...
    xfoo: Box Provider: virtualbox
    xfoo: Box Version: >= 0.12.0, < 1.0.0
==> xfoo: Box file was not detected as metadata. Adding it directly...
You specified a box version constraint with a direct box file
path. Box version constraints only work with boxes from Vagrant
Cloud or a custom box host. Please remove the version constraint
and try again.

打开调试信息,发现:

C:\foo>vagrant up --debug
INFO global: Vagrant version: 1.8.1
INFO global: Ruby version: 2.2.3
INFO global: RubyGems version: 2.4.5.1
......
INFO box_add: Downloading box: http://vagrant.xxx.com/xxx/foo-ubuntu.json => C:/Users/xxx/.vagrant.d/tmp/box23c35c4058493b8228b6114d4cfdbbc0a5b597c2

这个问题跟下列已知问题类似,都是curl获取不到box的元数据。

  • error: You specified a box version constraint with a direct box file path #165
  • Vagrant cannot fetch coreos_production_vagrant.json #236
  • Issue downloading json file from box_url #4647
  • vagrant box add should handle 404 errors when downloading a remote box or box.json file #5332

最后,我把Vagrant降级到1.7.4,这个问题不再复现!

标题:遇到"vagrant up"无法读取box元数据问题
作者:mryqu
声明: 本博客所有文章除特别声明外,均采用 CC BY-NC-SA 3.0 CN 许可协议。转载请注明出处!

#vagrant# #version# #constraint# #box_url# #issue#
[C++] 给twitcurl添加访问频次限制信息获取功能
升级Windows版Git客户端
  • 文章目录
  • 站点概览

Programmer & Architect

662 日志
27 分类
1472 标签
GitHub Twitter FB Page
© 2009 - 2023 Mryqu's Notes
Powered by - Hugo v0.120.4
Theme by - NexT
0%