Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.

TrickyDicky's avatar

How can it be so difficult to get started with Starter Kits?!?

Edited 25th March @ 01:11 am!!! :-( ... for new viewers:

I'm almost pulling my hair out. How is it possible that I can have Laravel Installer successfully and globally installed, yet in a terminal window ... "laravel: command not found" ???

OK - let me give you guys as much info as you might want/need ...

I've created a virtual host "laravel12" (root being /var/www/laravel12) and checked - Apache2 is serving it's "Index of /" blank page in a browser (Chrome).

I've already installed "composer global require laravel/installer" successfully.

I've cd'd in to "/var/www" in a terminal window and entered "laravel new example-app" as per Laravel's "Creating a Laravel Project" page.

The response I get in the terminal is : "laravel: command not found"

To give the full terminal output ...

richard@AsusAMD:/var/www/laravel12$ composer global require laravel/installer Changed current directory to /home/richard/.config/composer ./composer.json has been updated Running composer update laravel/installer Loading composer repositories with package information Updating dependencies Nothing to modify in lock file Writing lock file Installing dependencies from lock file (including require-dev) Nothing to install, update or remove Generating autoload files 18 packages you are using are looking for funding. Use the composer fund command to find out more! No security vulnerability advisories found. Using version ^5.14 for laravel/installer richard@AsusAMD:/var/www/laravel12$ cd .. richard@AsusAMD:/var/www$ cd .. richard@AsusAMD:/var/www$ laravel new laravel12 laravel: command not found

What is going on??? Something must have changed as I WAS able to get to Starter kit screen earlier this evening. Now for some unknown reason I can't !!!

Any clues anyone ???? :-/

end edit

Brand new to Linux Mint - relatively new install (2 weeks ago). Previously WIn7/WAMP using Netbeans etc. so I'm no Noob to certain things, except this.

I've installed Apache2/PHP8.x/MySQL+PhpMyAdmin, Composer, Netbeans25 etc... (btw - why does almost everyone use VS Code over Netbeans??)

I want to get to know what's what with Laravel so I can start to update my 3 sites, getting away from php7.4 and the errors when upgrading to php8.x :-( Having certain issues ... but one at a time.

Following the Laravel "Create an App using a Starter Kit" ...

"composer global require laravel/installer" - Check! "Using version ^5.14 for laravel/installer"

Next, Laravel instructions say "laravel new my-app"

My terminal says;

"richard@AsusAMD:/var/www$ laravel new my-app

laravel: command not found"

What sort-of catch-22 voodoo is this??? Am I really "that" much of a "noob" to not instantly recognise that an obscure answer is staring me in the face?!?

Any enlightenment would obviously be greatly appreciated!

0 likes
11 replies
jlrdw's avatar

As a developer I would suggest staying up with the php change logs. Laravel has nothing to do with the updates to php.

I don't use any of those stacks I use Blade, regular javascript, and axios js.

But I do keep up and modify things if a new php version has changes.

I also write and use regular css.

TrickyDicky's avatar

@jlrdw Cheers for the reply ... Forget about the php stuff - I'm more after a reason/solution as to why, despite having laravel installer, running laravel new my-app comes up with command not found!?!

And BTW - I was doing html/js/php etc. using Notepad!! Yes - hard core coding in those days!! lol

jlrdw's avatar

@TrickyDicky have you ran:

composer selfupdate

Also clear composers cache. And do you have the required php version that laravel requires?

I also use netbeans. But for python I use VS. But VS is good for laravel specific intellisense. Not needed if you know what you're doing.

I like netbeans for some smaller jakarta ee apps.

Edit:

You could uninstall composer and install again and tell it where php is located.

Also linux is a steep learning curve, takes a while to get used to it. I would stay away from it, I messed with it for a year, but no good security. Enterprise linux servers has the good security. Desktop is clamav.

Years ago linux was fine, but attackers is now even getting through linux more and more. It's not as secure any longer unless a enterprise server.

For a hobby and playing is one thing, but I don't trust it.

TrickyDicky's avatar

Everything is up to date. Composer, php v8.3 ... I'm just utterly perplexed as to Why Laravel doesn't want to install a starter kit when Laravel's own documentation says Do 2 things.

I REALLY did NOT want to go Windo$e 11 but WAMP was so, So, much easier. Here, how many different ways of spinning up a server ?!? Netbeans, Vue, Terminal .... and undoubtedly many more besides.

:-(

And setting up virtual hosts!!! I lost a week just on that one - finding all the irrelevant stuff on the net, 12/13 years old ... But then ... penny dropped. It was my own fault, but I should've remembered about the etc/hosts file :-(

And ironically, I've already succeeded in installing 2 of the 3 starter kits. But this time, it just wont let me!!

FYI ... 1st time no probs - even connected to MySQL. 2nd time, no probs installing but wouldn't connect to 'root'@'localhost' - usual error :-( but 3rd time, Laravel doesn't even know it's installed :-(

Bizarre.

TrickyDicky's avatar

@jlrdw I can't remember now :-( There's so much "stuff" tagged on to them ... React, Vue, Limevire, Vite ... then the plethora of other options from the CLI.

Just scrolling thru Netbeans terminal window ... that's another hour of therapy I'll need :-(

jlrdw's avatar

@TrickyDicky I suggest just install laravel first. You probably don't need a starter kit. If on Linux I suggest use Nginx for the server.

TrickyDicky's avatar

@jlrdw Cheers for the suggestions, but I've already got Apache2 running, can easily (now I've worked it out!!!) set up virtual hosts (literally just done another one 5 mins ago for what I was hoping would be another starter kit - just to play with and find out about!!) but once again I'm presented with the baffling Laravel Installer is installed, yet in terminal ... "laravel: command not found"

I'm almost pulling my hair out!!!

TrickyDicky's avatar

@jlrdw Umm. Several times!!! As if it would make any difference :-/

"/usr/bin/php" "/usr/local/bin/composer" "--ansi" "--no-interaction" "require" "laravel/laravel:* v12.0.3" ./composer.json has been updated Running composer update laravel/laravel Loading composer repositories with package information Updating dependencies Nothing to modify in lock file Writing lock file Installing dependencies from lock file (including require-dev) Nothing to install, update or remove Generating autoload files 52 packages you are using are looking for funding. Use the composer fund command to find out more! Done. No security vulnerability advisories found.

TrickyDicky's avatar

@jlrdw I'm sure you're getting thoroughly bored by now ... Sorry :-) but I've been trawling thru my .bash history (Oh What Joy!!!) and recognised one line from earlier today ;

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

Guess what!?! It worked. Eventually. I couldn't use the directory I'd already created as a virtual host :-( but no biggie.

Documentation on the install process is wrong! It said somewhere you coud choose the dbase ... but it always defaults to sqlite, so I get a "WARN: Could not find driver" blah blah blah.

And also "1 high severity vulnerability" which it says run "npm audit fix".

Texas!! It's still daylight where you are then!?! I'm in north Wales, UK - 2.10am here now :-(

Anyway, thank you for putting up with me ranting!! Cheers ;-)

Please or to participate in this conversation.