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

Nick385's avatar

Stuck on Homestead installation

Hi i just got a fresh install of linux mint 17, im new to laravel.

i followed this tutorial

https://laracasts.com/series/laravel-5-fundamentals/episodes/2

with

http://laravel.com/docs/5.0/homestead

Im stuck @ bash init.sh

is used the git clone https://github.com/laravel/homestead.git Homestead

for instal now i got in one here when i ran bash i got this

~ $ git clone https://github.com/laravel/homestead.git Homestead

Cloning into 'Homestead'...

remote: Counting objects: 875, done.

remote: Total 875 (delta 0), reused 0 (delta 0), pack-reused 875

Receiving objects: 100% (875/875), 131.32 KiB | 0 bytes/s, done.

Resolving deltas: 100% (504/504), done.

Checking connectivity... done.

~ $ homestead

homestead: command not found

~ $ ;s

bash: syntax error near unexpected token `;'

~ $ ls

Desktop Documents Downloads Homestead Music Pictures Public Templates Videos

~ $ cd Homestead

~/Homestead $ bash init.sh

Homestead initialized!

and now im stuck because when i type homestead in the command i get

$ homestead homestead: command not found

What am i doing wrong?

0 likes
33 replies
mstnorris's avatar

@Nick385 Run composer global require "laravel/homestead=~2.0"

And then make sure ~/.composer/vendor/bin is in your $PATH. Add the following to your ~/.bashrc file (or equivalent).

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

On a side note, take a look at http://bit.do/laracasts-guidelines for guidelines when asking questions on here, particularly the formatting code, just so it is more readable for us :D

Nick385's avatar

When i run it i get this response:

$ composer global require "laravel/homestead=~2.0" No command 'composer' found, did you mean: Command 'compose' from package 'mime-support' (main) composer: command not found

Nick385's avatar

where to? because i though composer was global just like homestead

Nick385's avatar

With certifacate i run 1 part then the part behind |

Nick385's avatar

i instal everything in home folder by default can that be it? homstead in there 2

mstnorris's avatar

Please delete the previous post with all the certificates, it just gets in the way. Also, instead of adding new replies (when no one else has replied since) just edit your previous post.

mstnorris's avatar

Now that you've downloaded it, you can just run composer.phar

Also please look at these guidelines for when you're posting on here. Just a little FYI.

Nick385's avatar

Composer successfully installed to: /home/nick/composer.phar Use it: php composer.phar

Is that the right folder for it?

Nick385's avatar

Linux mint 17 clean install second time around :P

Nick385's avatar

I found the yaml file in the terminal but not i need to edit it:

http://laravel.com/docs/5.0/homestead bash init.sh The Homestead.yaml file will be placed in your ~/.homestead directory.

Configure Your Provider

The provider key in your Homestead.yaml file indicates which Vagrant provider should be used: virtualbox, vmware_fusion (Mac OS X) or vmware_workstation (Windows). You may set this to whichever provider you prefer.

provider: virtualbox

nick@nick-MS-7366 ~ $ cd ~/.homestead nick@nick-MS-7366 ~/.homestead $ ls after.sh aliases Homestead.yaml nick@nick-MS-7366 ~/.homestead $ Homestead.yaml

mstnorris's avatar

Have you edited it? I'm not sure whether you're asking a question or just posting your progress.

Nick385's avatar

A bit of both this stil doesnt work

$ composer global require "laravel/homestead=~2.0" No command 'composer' found, did you mean: Command 'compose' from package 'mime-support' (main) composer: command not found

https://laracasts.com/series/laravel-5-fundamentals/episodes/2 t- 5:25 i dont get that when i type homestead

and i didnt edit the .yaml yet because i dont know how

Btw a really appreciate the help!!

mstnorris's avatar

Move the composer.phar file into a directory where your executables are stored, usually something like /bin, all the while renaming it to drop the .phar; like so:

mv composer.phar /bin/composer

You should be able to run composer now. Try it...


As for editing your Homestead.yaml file, you can do it in a standard text editor or from the command line. YAML is just text.

Nick385's avatar

this is the response

$ ls composer.phar Documents Homestead Pictures Templates Desktop Downloads Music Public Videos

nick@nick-MS-7366 ~ $ mv composer.phar /bin/composer mv: cannot create regular file ‘/bin/composer’: Permission denied

nick@nick-MS-7366 ~ $ sudo mv composer.phar /bin/composer [sudo] password for nick:

nick@nick-MS-7366 ~ $ sudo mv composer.phar /bin/composer mv: cannot stat ‘composer.phar’: No such file or directory

mstnorris's avatar

Then you don't have a /bin directory, so either create it, or place composer.phar somewhere else that is accessible from your $PATH.

Run $PATH and post the output here.

Nick385's avatar

When i go to My Computer and instead of home i go to file system i see the bin folder

That makes me think of something when i installed Mint i put the disk on ext and mounted the drive on / is that correct or did i have to mount it some where else that that's the reason why it doesn't work like it supposed to?

mstnorris's avatar

@Nick385 what operating system are you using? Please have a read of the Guidelines I posted above first.

Nick385's avatar

Operating System: Linux Mint 17.1 Cinnamon 64-bit

Cinnamon Version: 2.4.5

Linux Kernel: 1.13.0.37

Nick385's avatar

nick@nick-MS-7366 ~ $ $PATH bash: /usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games: No such file or directory

mstnorris's avatar
Level 55

Well /bin does exist and is part of your $PATH

sudo mv composer.phar /usr/local/bin/composer

Nick385's avatar

Then why doesn't this command work?

mv composer.phar /bin/composer

Next

Please or to participate in this conversation.