简体   繁体   English

-bash:laravel:找不到命令

[英]-bash: laravel: command not found

I have installed the composer and move the composer.phar file to /usr/local/bin just follow the following step: 我已经安装了composer并将composer.phar文件移动到/ usr / local / bin,只需按照以下步骤操作:

#curl -sS https://getcomposer.org/installer | php
#mv composer.phar /usr/local/bin/composer

Then I edit my ~/.bash_profile file as following: 然后我编辑我的~/.bash_profile文件,如下所示:

export PATH=~/.composer/vendor/bin

and save the change and excute: 并保存更改并执行:

#source ~/.bash_profile

But, when I excute the laravel new test command, it returns an error: 但是,当我执行laravel new test命令时,它会返回一个错误:

 -bash: laravel: command not found 

PS: in /usr/local/bin directory have no laravel command just composer command exists. PS:在/usr/local/bin目录下没有laravel命令只有composer命令存在。

Did I forgot something? 我忘记了什么吗?

First, download the Laravel installer using Composer: 首先,使用Composer下载Laravel安装程序:

Command like this, 像这样的命令,

composer global require "laravel/installer=~1.1"

for more information Click Here 了解更多信息请点击这里

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM