Issues installing Homestead 3 (OS X)

Posted 3 years ago by MichaelLake

Brand new to Laravel/Homestead, but very excited about this platform. I’m having trouble getting Homestead up and running and most of the documentation and troubleshooting advice on the Internet isn’t quite up to speed since Homestead 3 is fairly new. My end goal is to have one Homestead machine for developing a handful of Laravel-based projects, so I’m trying to install Homestead on a global basis rather than per-project.

I’ve tried installing Homestead via composer global require "laravel/homestead" as instructed in a few Laracast episodes, but when I try to do any homestead commands from within my project directory, such as homestead init, I end up with:

[Symfony\Component\Console\Exception\CommandNotFoundException]  
  Command "init" is not defined.

Figuring this might be a problem because those instructions were for v2, I removed the Composer global installation and tried the documented method of just cloning Homestead into my Projects directory with git clone https://github.com/laravel/homestead.git Homestead, but then I get:

PHP Warning:  require(/Users/beorn/Projects/Homestead/../../autoload.php): failed to open stream: No such file or directory in /Users/beorn/Projects/Homestead/homestead on line 7

Warning: require(/Users/beorn/Projects/Homestead/../../autoload.php): failed to open stream: No such file or directory in /Users/beorn/Projects/Homestead/homestead on line 7
PHP Fatal error:  require(): Failed opening required '/Users/beorn/Projects/Homestead/../../autoload.php' (include_path='.:') in /Users/beorn/Projects/Homestead/homestead on line 7

Fatal error: require(): Failed opening required '/Users/beorn/Projects/Homestead/../../autoload.php' (include_path='.:') in /Users/beorn/Projects/Homestead/homestead on line 7

I can’t figure out why homestead is trying to load ../../vendor/autoload.php when I’m in a project that has a vendor/autoload.php file.

Between the two methods, I’d prefer the global Composer installation, as it would make updating a little simpler, but I could make the git version work if needed. Both installation methods are installing version 3.0.2, which is the current version as of today. Any thoughts or guidance would be helpful!

Please sign in or create an account to participate in this conversation.