美文网首页
低版本vagrant在下载远程box时报错

低版本vagrant在下载远程box时报错

作者: ggcoder | 来源:发表于2020-05-24 20:25 被阅读0次
    问题:The box 'generic/centos7' could not be found or could not be accessed in the remote catalog
    Bringing machine 'default' up with 'virtualbox' provider...
    ==> default: Box 'generic/centos7' could not be found. Attempting to find and install...
        default: Box Provider: virtualbox
        default: Box Version: >= 0
    The box 'generic/centos7' could not be found or
    could not be accessed in the remote catalog. If this is a private
    box on HashiCorp's Atlas, 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://atlas.hashicorp.com/generic/centos7"]
    Error: The requested URL returned error: 404 Not Found
    
    错误
    问题原因:vagrant版本过低(我的是1.7.2),官方已经更换了地址,升级vagrant到2.x或者在Vgrantfile中配置下载地址

    1)升级可重新安装
    2)修改配置:在Vagrantfile中添加Vagrant::DEFAULT_SERVER_URL.replace('https://vagrantcloud.com')即可

    修改配置

    然后执行vagrant up,OK!

    success

    国内可用box源:
    http://mirrors.ustc.edu.cn/centos-cloud/centos/6/vagrant/x86_64/images/

    相关文章

      网友评论

          本文标题:低版本vagrant在下载远程box时报错

          本文链接:https://www.haomeiwen.com/subject/svzjahtx.html