laravel 未定义宅基地初始化

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/34642671/
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

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-09-14 12:59:37  来源:igfitidea点击:

homestead init not defined

phplaravelhomestead

提问by Andru

While installing homestead following the official installation instructions of version 4.2, I received the following error message when executing $ homestead init: error message

在按照4.2版官方安装说明安装homestead时,我在执行时收到以下错误信息$ homestead init错误信息

i.e.

IE

 [Symfony\Component\Console\Exception\CommandNotFoundException]  
  Command "init" is not defined.

My step before that was to install homestead with composer global require "laravel/homestead=~3.0"

我之前的步骤是安装宅基地 composer global require "laravel/homestead=~3.0"

I installed Laravel Homestead version 3.0.1and homesteadis in my PATH.

我安装Laravel Homestead version 3.0.1homestead在我的PATH.

采纳答案by Matt Inamdar

Hmmm I remember having this problem when I was first installing homestead. I can see the link you provided is in relation to Laravel 4.2. Following the homestead installation from the 5.2 docs seemed to be fine for myself however:

嗯,我记得我第一次安装 Homestead 时遇到过这个问题。我可以看到您提供的链接与 Laravel 4.2 相关。但是,按照 5.2 文档中的 homestead 安装对我来说似乎没问题:

Laravel Homestead: Installation & Setup

Laravel Homestead:安装和设置

回答by theRana

The solution is very simple. Make sure you have added this to your bash profiel or .zshrc file.

解决方法很简单。确保您已将此添加到您的 bash 配置文件或 .zshrc 文件中。

function homestead() {
    ( cd ~/Homestead && vagrant $* )
}