Skip to content

Instantly share code, notes, and snippets.

@trevorgreenleaf
Last active September 7, 2021 15:48
Show Gist options
  • Star 2 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save trevorgreenleaf/826ec7a0bd6b2c8de88de27ecbfa7487 to your computer and use it in GitHub Desktop.
Save trevorgreenleaf/826ec7a0bd6b2c8de88de27ecbfa7487 to your computer and use it in GitHub Desktop.
Laravel Valet on Multiple User Accounts
sudo rm -rf /usr/local/Homebrew/
sudo rm -rf /usr/local/var/homebrew/
sudo rm -rf /usr/local/Cellar/php71/
sudo rm -rf /usr/local/include/php/
sudo rm -rf ~/.valet
/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
brew install homebrew/php/php71
composer global require laravel/valet
brew link --overwrite php71
valet install
#Then just go to directory and run valet park
@trevorgreenleaf
Copy link
Author

Have Hombrew permission issues?
sudo chown -R "$USER":admin /usr/local

@trevorgreenleaf
Copy link
Author

Also try running:
brew doctor

@trevorgreenleaf
Copy link
Author

If you need to fix the
In Brew.php line 192: Unable to determine linked PHP.

brew unlink php && brew link php
brew services restart --all
composer global update
valet start

@edward-rw
Copy link

Thanks for putting this out there. I need to setup valet for 2 separate accounts on a single user. What does this gist do more than reinstall what you just deleted? And how does this make a multiple user setup work? Is it the brew link --overwrite that does the trick? Thanks for your time.

@simplenotezy
Copy link

What @edward-rw asks. I had exact same question.

I have a main administrator account, and then a "normal" user account where I do my work. I am really interesting in how we can install valet.

It could also be relevant to specify from which user account above gist should be run, although I am assuming it's the main admin account, given your use of sudo

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment