【问题标题】:Vagrant box add fail流浪框添加失败
【发布时间】:2016-01-01 14:23:29
【问题描述】:

我正在尝试添加

laravel/宅基地

盒子在流浪,但我得到不同的错误。

通过运行

vagrant box 添加 laravel/homestead

我收到此错误

The box 'laravel/homestead' 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/laravel/homestead"] Error:

我尝试“流浪登录”并成功登录,但仍然收到相同的错误。

我尝试手动下载盒子,但是我仍然无法添加它。

通过运行此命令

vagrant box 添加 laravel/homestead [Windows 中的路径]

我明白了

==> box: Adding box 'laravel/homestead' (v0) for provider:
    box: Unpacking necessary files from: file://C:/Users/eNull/Downloads/hc-download
    box:
An error occurred while downloading the remote file. The error
message, if any, is reproduced below. Please fix this error and try
again.

我的操作系统:Windows 10。

cUrl 版本:curl 7.45.0 (x86_64-w64-mingw32) libcurl/7.45.0 OpenSSL/1.0.2d zlib/1.2.8 libidn/1.32 libssh2/1.6.0 librtmp/2.3

流浪者:1.8.1

虚拟框:5.0.12

【问题讨论】:

    标签: laravel vagrant homestead


    【解决方案1】:

    您无需从网络添加该框。初始化而不是这个:

    vagrant init laravel/homestead
    vagrant up
    vagrant ssh
    

    Vagrant 应该会自动在框列表中添加宅基地。 如果要设置本地下载的盒子,最好直接从盒子目录添加盒子。:

    cd [path in windows]
    vagrant box add [name_box] laravel/homestead
    vagrant up
    vagrant ssh
    

    【讨论】:

    • 它说在远程目录中找不到或无法访问框“laravel/homestead”。如果这是 HashiCorp 的 Atlas 上的私人邮箱,请验证您已通过 vagrant login 登录。另外,请仔细检查名称。展开后的 URL 和错误信息如下图所示:但实际上我已经登录了!
    • 下载的盒子本地安装怎么样?
    • 我已经在我的案例中发布了解决方案。通过改变卷曲。它不工作。本地和互联网。但是想知道为什么在本地开始工作,因为在本地他们不使用 cUrl:/
    • 我想知道 curl 的意义何在?它对你有什么帮助?
    • 好吧,vagrant box add 将访问 ATLAS 服务器以获取“laravel/homestead”,在这种情况下,他们使用 cUrl。所以当我更新它的工作。但在本地我不确定为什么它真的有效。也许他们出于不同的原因对 ATLAS 有一些要求。如果我得到答案,我会在这里发布。
    【解决方案2】:

    固定。

    我下载了

    cUrl x64 with SSL
    

    并将其替换为 Vagrant 提供的 curl.exe。

    也就是说,我把curl.exe复制到了

    C:\HashiCorp\Vagrant\embedded\bin
    

    现在它运行良好。

    【讨论】:

      【解决方案3】:
      vagrant box add laravel/homestead https://atlas.hashicorp.com/laravel/boxes/homestead
      

      【讨论】:

      • 这个问题已经有了明确的答案,你只是在这里转储了一行代码,没有任何周围的解释。
      【解决方案4】:

      使用chocolate down cUrl,并将其替换为Vagrant提供的curl.exe。然后就可以了。

      我通过脚本发现错误:vagrant box add {box path} --debug

      【讨论】:

        猜你喜欢
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        • 2022-10-26
        • 1970-01-01
        • 2020-09-13
        相关资源
        最近更新 更多