Laravel command not found ubuntu mac

Rakesh Sharma      1 Comment  

Laravel command not found ubuntu mac :-

Installing laravel via laravel installer so easy but sometime we stuck with some commands. this is new and fast method of it’s installation. i am sharing soultion of this one of error in Laravel command not found ubuntu mac. there is only path setup problem. that’s not cleared explained in there official docs. so i have also serached more for laravel command not found. when i type laravel after install. it’s all time shows error laravel command not found. so there is simple solution for this. In this artice we will explore error laravel command not found ubuntu mac for both operating system for ubuntu and mac.

laravel command not found on ubuntu :-

1. Via terminal command run :- This solution need path command run on every installation. first download and install laravel installer then set up path for laravel command run and check by run command laravel.

# download installer
composer global require "laravel/installer=~1.1"
#setting up path
export PATH="~/.composer/vendor/bin:$PATH" 
# check laravel command
laravel 

Laravel command not found ubuntu mac

2. configuration .bashrc :-

a. First download and install laravel installer

# download installer
composer global require "laravel/installer=~1.1"

b. Add an alias of laravel installer in user configuration .bashrc:

nano ~/.bashrc

c. Add below code inside this file:

alias laravel='~/.composer/vendor/bin/laravel'

d. run below command to make sure your bashrc profile is reloaded.

source ~/.bashrc

e. run below command to make sure laravel command is working

laravel

laravel command not found on mac :-

If on mac (and *nix) just run this in your terminal after sucessful installation of laravel installer.

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

For more information about mac errors follow Official forum

Installing laravel via laravel installer :-

simply run one more command after go to directory where you want to install project.

# going to html dir to create project there
cd /var/www/html/
# install project in blog dir.
laravel new blog

so now you have installed successfully. and also solved error laravel command not found ubuntu mac

  • Adios Jet

    many thanks