I'm brand new to coding. I am working on a project with a developer, and he says he will be "running Vagrant via Homestead." I've tried to follow a couple installation guides online. I wonder if I have switched between too many sites and now I've got everything messed up within my terminal.
I am using a Mac and running Sierra. Here's what I've done so far (The instructions I was following originally can be found here: https://laravel.com/docs/4.2/homestead ):
-
I downloaded VirtualBox 5.1.10 platform package for Mac.
-
I downloaded the VirtualBox 5.1.10 SDK
-
I downloaded Vagrant for Mac OS X from
https://www.vagrantup.com/downloads.html
-
Then I ran the following code in my terminal:
vagrant box add laravel/homestead
When I ran this code, I got the following error:
Josephs-MBP:~ Joey$ vagrant box add laravel/homestead
==> box: Loading metadata for box 'laravel/homestead'
box: URL: https://atlas.hashicorp.com/laravel/homestead
==> box: Adding box 'laravel/homestead' (v0.6.1) for provider: vmware_desktop
The box you're attempting to add already exists. Remove it before
adding it again or add it with the `--force` flag.
Name: laravel/homestead
Provider: vmware_desktop
Version: 0.6.1
I'm not sure how to remove before adding again. This is my first roadblock.
-
Next, I went to getcomposer.org and followed these instructions to install: https://www.youtube.com/watch?v=BnIZVHmROkk This worked well. When I had finished, I was able to type 'composer' into my Terminal and it would run.
-
The next step in the instructions totally threw me for a loop. Maybe it didn't work because of the issue I had in #4 above? Here's what the directions say:
Installing Homestead
With Composer + PHP Tool
Once the box has been added to your Vagrant installation, you are ready to install the Homestead CLI tool using the Composer global command:
composer global require "laravel/homestead=~2.0"
Make sure to place the ~/.composer/vendor/bin directory in your PATH so the homestead executable is found when you run the homestead command in your terminal.
Once you have installed the Homestead CLI tool, run the init command to create the Homestead.yaml configuration file:
homestead init
The Homestead.yaml file will be placed in the ~/.homestead directory. If you're using a Mac or Linux system, you may edit Homestead.yaml file by running the homestead edit command in your terminal:
homestead edit
When this turned into a dead end, I tried following these instructions: http://petericebear.github.io/installing-laravel-homestead-osx-20160514/
I ran the following line of code as directed:
sudo -s 'echo "~/.composer/vendor/bin" > /etc/paths.d/40-composer'
and I received the following error:
Josephs-MBP:~ Joey$ sudo -s 'echo "~/.composer/vendor/bin" > /etc/paths.d/40-composer'
Password:
/bin/bash: echo "~/.composer/vendor/bin" > /etc/paths.d/40-composer: No such file or directory
Josephs-MBP:~ Joey$
This is likely a poorly written question, but maybe someone can help me get this all straightened out. Hoping I won't end up done trying to learn PHP/Laravel before I even get started.
Thanks!