PHPFixing
  • Privacy Policy
  • TOS
  • Ask Question
  • Contact Us
  • Home
  • PHP
  • Programming
  • SQL Injection
  • Web3.0

Saturday, January 15, 2022

[FIXED] Unable to create new Laravel project

 January 15, 2022     composer-php, installation, laravel     No comments   

Issue

What I'm trying to accomplish:

Create a new Laravel project

What I'm trying:

I've been trying to follow the installation instructions

  1. sudo composer global require laravel/installer
  2. export PATH="/home/hedwin/.composer/vendor/bin:$PATH"

When I try to run the following command:

sudo Laravel new trainingLaravel

it returns this error:

sudo: laravel: command not found

You can see my picture for details : Terminal

I'm on ubuntu 18.04.

Thanks a lot for every help..


Solution

edit : problem unsolved, i completely remove laravel/installer

composer global remove laravel/installer

then i redo installation in /home/hedwin/ directory :

https://gist.github.com/zunayed93/80ba8611a88623c20f9bb6c7b4e25792

but my way to add /vendor/bin dir. to the path didn't work so i follow instructions at Laravel PHP Command Not Found

"Ok, I did that and it works:

nano ~/.bash_profile 

And paste

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

do source ~/.bash_profile "

and finally command laravel new something works !



Answered By - Hedwin Bonnavaud
  • Share This:  
  •  Facebook
  •  Twitter
  •  Stumble
  •  Digg
Newer Post Older Post Home

0 Comments:

Post a Comment

Note: Only a member of this blog may post a comment.

Total Pageviews

Featured Post

Why Learn PHP Programming

Why Learn PHP Programming A widely-used open source scripting language PHP is one of the most popular programming languages in the world. It...

Subscribe To

Posts
Atom
Posts
Comments
Atom
Comments

Copyright © PHPFixing