Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
380 views
in Technique[技术] by (71.8m points)

php - zsh: command not found laravel

I'm a newbie when it comes to Linux administration using bash... I was following a tutorial on how to install laravel 5.2 from here... installed it successfully...

firstly I installed composer and ran the following command

composer global require "laravel/installer"

after this put this in my path too in ~/.zshrc like this

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

When I run the laravel command from the terminal I get the following error

?  ~ laravel 
zsh: command not found: laravel

If I echo $PATH it shows it have added up in the path

Note: I have installed oh my zsh on my terminal...

What do I have to do to get it working please help

question from:https://stackoverflow.com/questions/36510327/zsh-command-not-found-laravel

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)

I think ZSH won't expand the ~ on PATH. Try this instead:

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

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...