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

jdperdue's avatar

Newbie having trouble getting started :-{

Just signed up on Laracasts today and going through the tutorial on setting up vagrant/homestead. When I create the application, i.e, laravel new example, I getting './laravel: No such file or directory'. I obviously missed something like a path, but I'm sure where that 'laravel' command should have been installed on my Mac. Any suggestions? I started, cleaned up and started this tutorial twice already. Thanks.

0 likes
10 replies
rigwit's avatar
rigwit
Best Answer
Level 11

I think the laravel command is an alias to the actual composer command to create a new project. Try using 'composer create-project laravel/laravel [insert_project_name]' instead.

jdperdue's avatar

Thanks for the reply. I've used 'composer create-project' on my LAMP set up. I'm trying to get this vagrant/homestead env set up to run some of these tutorials. Funny but this 'laravel' command in the tutorial is run outside of the vagrant VM. PHP and composer are not in the Mac env.
I finally got on track with the tutorial by starting up vagrant and running composer create inside the VM.
Thanks again for the heads up!

jdperdue's avatar

So I need to install composer in the Mac env?? I didn't see an alias in the docs to the 'laravel' command. BTW, I love this site and the exercises!

jimmy.puckett's avatar

@jdperdue, Yes, you install composer in the mac's env, and then install "laravel/installer" globally. As you also guessed, you will need to add "~/.composer/vendor/bin" to your path on the mac's env too.

5pArxz's avatar

edit...

This method is deprecated.

This is what i used to do :

wget http://laravel.com/laravel.phar

mv laravel.phar /usr/local/bin/laravel

chmod +x /usr/local/bin/laravel

Now you can run:

laravel new {project name}

Then whala you should see:

Crafting application...

If you get a permission denied error just run as sudo

jimmy.puckett's avatar

@5pArxz Not sure if you saw it, but Taylor put the installer out as a composer package about 7 days ago & updated the install docs (referenced by @JefferyWay above) to use the composer method. He said in the laravel.io podcast that he was going to go away from the .phar file as the global composer package would be easier to maintain.

tkaw220's avatar

"... you will need to add "~/.composer/vendor/bin" to your path on the mac's env too".

What should I do to get this work in Windows? Thanks.

Please or to participate in this conversation.