Reputation: 33
I have faced a very strange issue with Homestead on a mac.
I've installed vagrant, virtual box, homestead. When I run homestead
, I see the full list of commands, but homestead up
gives a Vagrant: command not found error. No idea what could be wrong, I already created and configured the Homestead.yaml file, vagrant -v
gives me the correct version of vagrant, the problem appears only when I need to boot the homestead machine.
Any ideas what could be wrong?
Upvotes: 3
Views: 2274
Reputation: 464
I will explain the steps from the beginning so you can check if you did something wrong. I suggest you delete your homestead folder and try installing it again to see what happens.
Did you installed homestead locally or globally?
( like git clone https://github.com/laravel/homestead.git Homestead
or composer global require laravel/homestead
)
If the answer is locally you need to go inside the folder created when you cloned homestead and then run this command to init the config files of homestead ( ~/.homestead/Homestead.yaml)
bash init.sh
If you installed it globally you can use this command from anywhere. After that you just need to configure the Homestead.yaml file as explained in the doc. Only then you run
homestead up
If it still doesn't work, try running vagrant global-status
get the ID of your homestead vm and then run vagrant up [machineId]
Upvotes: 2
Reputation: 1071
You need to be in folder of homestead folder. After you git clone homestead (https://github.com/laravel/homestead) cd in it and then try with command vagrant up or homestead up. Then vagrant will create and configure homestead machine according to homestead Vagrant file.
Also check vagrant documentation (https://docs.vagrantup.com/v2/cli/up.html)
Upvotes: 1