【问题标题】:The box 'laravel/homestead' could not be found找不到“laravel/homestead”框
【发布时间】:2015-06-10 07:48:09
【问题描述】:

尝试配置 laravel 5.1。

克隆了laravel/homestead

克隆到Home目录后。尝试运行 vagrant up 命令时抛出错误,如下所示:

user@user:~/laravel/homestead$ vagrant up
Bringing machine 'default' up with 'virtualbox' provider...
There are errors in the configuration of this machine. Please fix
the following errors and try again:

vm:
* The box 'laravel/homestead' could not be found.

我第一次尝试使用vagrant box add laravel/homestead

This command was not invoked properly. The help for this command is
available below.

Usage: vagrant box add <name> <url> [--provider provider] [-h]

        --checksum VALUE             Checksum
        --checksum-type VALUE        Checksum type
    -c, --clean                      Remove old temporary download if it exists.
    -f, --force                      Overwrite an existing box if it exists.
        --insecure                   If set, SSL certs will not be validated.
        --cacert certfile            CA certificate
        --cert certfile              The client SSL cert
        --provider provider          The provider that backs 

还尝试将 url 作为显示的错误传递,但仍然失败。 Atlast 克隆 来自 git 仓库

1. vagrant -v : Vagrant 1.4.3

2。 vagrant box 添加 laravel/homestead https://atlas.hashicorp.com/laravel/boxes/homestead

错误:

Downloading box from URL: https://atlas.hashicorp.com/laravel/boxes/homestead
Extracting box...e: 0/s, Estimated time remaining: --:--:--)
The box failed to unpackage properly. Please verify that the box
file you're trying to add is not corrupted and try again. The
output from attempting to unpackage (if any):

bsdtar: Error opening archive: Unrecognized archive format

3.宅基地:

Laravel Homestead version 2.0.17

Usage:
  command [options] [arguments]

Options:
  -h, --help            Display this help message
  -q, --quiet           Do not output any message
  -V, --version         Display this application version
      --ansi            Force ANSI output
      --no-ansi         Disable ANSI output
  -n, --no-interaction  Do not ask any interactive question
  -v|vv|vvv, --verbose  Increase the verbosity of messages: 1 for normal output, 2 for more verbose output and 3 for debug

Available commands:
  destroy    Destroy the Homestead machine
  edit       Edit the Homestead.yaml file
  halt       Halt the Homestead machine
  help       Displays help for a command
  init       Create a stub Homestead.yaml file
  list       Lists commands
  provision  Re-provisions the Homestead machine
  resume     Resume the suspended Homestead machine
  run        Run commands through the Homestead machine via SSH
  ssh        Login to the Homestead machine via SSH
  status     Get the status of the Homestead machine
  suspend    Suspend the Homestead machine
  up         Start the Homestead machine
  update     Update the Homestead machine image

我做错了什么?

【问题讨论】:

  • 如果您尝试直接添加框会发生什么? vagrant box add laravel/homestead
  • @Alik - 更新了我的问题,请检查一下
  • 同时添加关于流浪版本vagrant -v的信息。 vagrant box add laravel/homestead https://atlas.hashicorp.com/laravel/boxes/homestead 究竟输出了什么?
  • 你本地安装了PHP和composer吗? Homestead 通常不会按照您描述的方式安装。
  • @ecs - 是的,php 和 composer 都已安装。在盯着 laravel 之前它太基本了,我已经仔细做了

标签: php ubuntu laravel vagrant laravel-5


【解决方案1】:

更新你的流浪者。 Vagrant Cloud 是在 1.5 IRC 中引入的,因此您的 vagrant 不明白如何处理像 vagrant box add laravel/homestead 这样的命令

【讨论】:

    【解决方案2】:

    正确的下载命令以添加完整的 URL
    您可以使用此 vm 框的最新版本,直到现在
    https://atlas.hashicorp.com/laravel/boxes/homestead/versions/0.4.1/providers/virtualbox.box
    如果您想更改为另一个版本或更新版本,只需更改它的数量
    所以命令应该是这样的

    vagrant box add laravel/homestead https://atlas.hashicorp.com/laravel/boxes/homestead/versions/0.4.1/providers/virtualbox.box

    该命令用于虚拟盒子,如果您的网速较低,您可以从 URL 下载它,完成后您可以使用本地 PC 上的路径而不是 URL。
    如果您仍然遇到问题,请尝试使用此命令卸载 vagrant

    rm -rf /opt/vagrant
    rm -f /usr/bin/vagrant

    适用于 Linux 用户的命令
    如果问题仍然尝试删除 ~/.vagrant.d 的文件夹,对于其他操作系统检查 this 卸载后您可以download 并安装它。
    最后确保您使用主目录中的所有命令 问候

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2015-04-08
      • 2015-09-06
      • 1970-01-01
      • 2018-05-13
      • 2015-10-29
      • 1970-01-01
      • 2018-10-11
      • 2015-05-17
      相关资源
      最近更新 更多