1

I installed the composer on my mac os and install laravel and added it to the path

so now printing the path you can see

 sudo nano /etc/paths

the result is:

/Library/Frameworks/Python.framework/Versions/2.7/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/Users/myname/.composer/vendor/bin/laravel

so laravel is there, however, when I do:

laravel new blog

I got this error:

-bash: laravel: command not found
10
  • Is laravel executable? Please give the result of ls -l /Users/myname/.composer/vendor/bin/laravel. Commented Feb 25, 2016 at 23:31
  • stackoverflow.com/questions/28597648/… Commented Feb 25, 2016 at 23:35
  • Have you restarted the terminal since updating the path? You'll need to do that, or source your bash file Commented Feb 25, 2016 at 23:57
  • @A.L i got this lrwxr-xr-x 1 myname staff 28 Feb 25 23:14 /Users/myname/.composer/vendor/bin/laravel -> ../laravel/installer/laravel Commented Feb 26, 2016 at 0:10
  • @Jeff yes I did restart the terminal Commented Feb 26, 2016 at 0:10

1 Answer 1

1

the result is:

/Library/Frameworks/Python.framework/Versions/2.7/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/Users/myname/.composer/vendor/bin/laravel

(emphasize mine)

See how most of the paths end with bin, but not the one with laravel.

You have to provide the path of the directory which contain the laravel command, your $PATH should be:

/Library/Frameworks/Python.framework/Versions/2.7/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/Users/myname/.composer/vendor/bin/

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.