3

I am using Yosemite OSX and when I type homestead into the terminal i keep getting command not found. here is my bash_profile, what am i doing wrong?

export composer="php /usr/bin/composer.phar"
export PATH="~/.composer/vendor/bin/:$composer:$PATH:/usr/local/bin"

I have also tried typing source ~/.bash_profile to reload my settings and nothing.

4

1 回答 1

5

简要说明:当您运行此命令时:

composer global require "laravel/homestead=~2.0" 

它说的是:

Changed current directory to /Users/Mavericks/.composer

你在那里看到 PATH 。因此,为了使您的工作更轻松,请将下面的行添加到您的 PATH 而不是您的。请记住根据您的更改此(“/Users/Mavericks”)部分。并且要小心,最后没有斜线。

/Users/Mavericks/.composer/vendor/bin:

打开一个新的终端选项卡。并尝试这个来检查它是否工作。

homestead --version

让我知道它是否有效。

于 2015-02-25T08:32:02.633 回答