将Composer bin目录添加到PATH后找不到Laravel命令

I ran sudo nano .bashrc and added

export PATH="~/.composer/vendor/bin:$PATH"

I restarted my terminal, ran laravel and received

laravel: command not found

I had run this prior to the above

composer global require laravel/installer

Also tried executing what I added to .bashrc in the terminal directly.

echo $PATH prints

/home/dev/.composer/vendor/bin:~/.composer/vendor/bin:~/.composer/vendor/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin
查看全部
dounue6984
dounue6984
2019/04/05 01:19
  • ubuntu
  • linux
  • php
  • 点赞
  • 收藏
  • 回答
    私信
满意答案
查看全部

1个回复