找不到框“laravel/homestead”
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/30750232/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
The box 'laravel/homestead' could not be found
提问by Mithun Shreevatsa
Trying to configure laravel 5.1.
尝试配置 Laravel 5.1。
Cloned the laravel/homestead
After cloning it to Home
directory. Throwing error when tried to run the vagrant up command as below:
将其克隆到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.
I first tried with
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
Also tried passing url as the error shown, still failed. Atlast cloned from the git repo
我第一次尝试
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,仍然失败。从 git repo 克隆的 Atlast
1. vagrant -v :Vagrant 1.4.3
1. 流浪者 -v :Vagrant 1.4.3
2. vagrant box add laravel/homestead https://atlas.hashicorp.com/laravel/boxes/homestead
2. vagrant box 添加laravel/homestead https://atlas.hashicorp.com/laravel/boxes/homestead
Error:
错误:
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. homestead :
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
What am i doing wrong?
我究竟做错了什么?
采纳答案by Alik
Update your Vagrant. Vagrant Cloud was introduced in 1.5 IRC, hence your vagrant
doesn't understand how to deal with command like vagrant box add laravel/homestead
更新你的流浪者。Vagrant Cloud 是在 1.5 IRC 中引入的,因此你vagrant
不明白如何处理像这样的命令vagrant box add laravel/homestead
回答by Zaman
the correct command to download its to add full URL
you can use this vm box its latest version until now
https://atlas.hashicorp.com/laravel/boxes/homestead/versions/0.4.1/providers/virtualbox.box
and if you want to change to another version or there newer one just change the number of it
so the command should be like this
下载它以添加完整 URL 的正确命令
你可以使用这个 vm box 直到现在它的最新版本
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
the command for Linux users
and if the problem still try to delete folder at ~/.vagrant.dand for other OS check thisafter uninstall you can downloadand install it.
at last make sure you use all commands at home directory
regards
Linux 用户的命令
,如果问题仍然尝试删除~/.vagrant.d 中的文件夹,对于其他操作系统,请
在卸载后检查此命令,您可以下载并安装它。
最后确保您使用主目录中的所有命令问候