Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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

like image 503
Amjad Avatar asked Apr 08 '16 22:04

Amjad


People also ask

Why PHP artisan serve not working?

Reasons why php artisan serve not working You are running php artisan serve command in wrong directory. php artisan serve is laravel command only work with laravel project. Check project directory and run in root directory of your project. The requested host or port is not available.

What is PHP artisan serve in laravel?

The Laravel PHP artisan serve command helps running applications on the PHP development server. As a developer, you can use Laravel artisan serve to develop and test various functions within the application. It also accepts two additional options. You can use the host for changing application's address and port.


1 Answers

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

export PATH="$HOME/.config/composer/vendor/bin:$PATH" 
like image 172
Chris Avatar answered Oct 10 '22 20:10

Chris