无法在远程目录中找到或无法访问Vagrant框 - 不兼容的curl版本

时间:2016-11-07 20:24:48

标签: macos vagrant virtualbox

我刚刚下载了Vagrant并进行了设置以及安装虚拟框。我无法开始我的项目(流浪汉)。我有一个流浪文件等等。我该怎么办?

$ vagrant up
Bringing machine 'default' up with 'virtualbox' provider...
==> default: Box 'scotch/box' could not be found. Attempting to find and install
...
    default: Box Provider: virtualbox
    default: Box Version: >= 0
The box 'scotch/box' 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/scotch/box"] 

5 个答案:

答案 0 :(得分:214)

似乎有一个issue与vagrant 1.8.7和嵌入式curl版本与mac os二进制文件(默认情况下在mac os Sierra和其他人发布) - 删除嵌入式文件

sudo rm /opt/vagrant/embedded/bin/curl

注意:当你添加一个流浪盒(远程或本地)时,你还需要删除嵌入的curl,这样如果你在运行vagrant box add ....时遇到同样的错误,只需从流浪者中移除卷曲即可会工作

答案 1 :(得分:0)

与Sierra有类似的问题(使用额外的Brew安装 - 这可能会产生影响)。

上面的sudo rm / opt / vagrant / embedded / bin / curl仍然无效:SSLRead()返回错误-36。

尝试http://slick.pl/kb/software/vagrant-fix-for-error-60-ssl-read/

的建议

任何情况:

cd ~
cd .vagrant.d/tmp/
rm -rf ~/.vagrant.d/tmp/
vagrant box add --insecure laravel/homestead

已成功安装。

答案 2 :(得分:0)

我刚刚遇到这个错误。 在我的情况下,我通过apt-get安装了vagrant,安装了1.7.x ..

我删除了1.7.x并直接安装了2.0.3 https://www.vagrantup.com/downloads.html

答案 3 :(得分:0)

在尝试使用盒子:centos / 7时,我在MacOS Mojave和Vagrant版本1.9.3上遇到了相同的问题。

def import_module(name, package=None):
    level = 0
    if name.startswith('.'):
        if not package:
            msg = ("the 'package' argument is required to perform a relative "
                   "import for {!r}")
            raise TypeError(msg.format(name))
        for character in name:
            if character != '.':
                break
            level += 1
    return _bootstrap._gcd_import(name[level:], package, level)

我更新到Vagrant 2.2.5,它按预期工作:

$ vagrant up
Bringing machine 'default' up with 'virtualbox' provider...
==> default: Box 'centos/7' could not be found. Attempting to find and install...
    default: Box Provider: virtualbox
    default: Box Version: >= 0
The box 'centos/7' 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/centos/7"]
Error: The requested URL returned error: 404 Not Found

答案 4 :(得分:0)

您应该尝试将 Vagrant 更新到最新版本:

sudo add-apt-repository ppa:tiagohillebrandt/vagrant
sudo apt update

这将为您的实际 ubuntu 版本添加一个存储库。如果您使用的是 20.10 (groovy),请将 groovy 替换为 focus 并再次调用 sudo apt update

然后再次安装 vagrant:

sudo apt install vagrant

并更新所有插件:

vagrant plugin update
相关问题