How can I fix Homebrew issues while setting up a Laravel dev environment on Mac?
#1
I’m trying to set up a local development environment on my Mac for a Laravel project, and I keep hitting a wall with Homebrew. Every time I think I’ve got the dependencies sorted, something else fails to install or link correctly. Has anyone else gone through this recently and found a reliable sequence of steps?
Reply
#2
I was banging my head on Homebrew for days; I finally did a clean reinstall, ran brew update && brew doctor, fixed Xcode command line tools, then installed PHP 8.0 with brew install php@8.0 and ran brew link --force php@8.0.
Reply
#3
I switched to Laravel Valet on a clean Mac and ran a Dockerized stack for the rest; the lingering dependency fights stopped once I stopped mixing host libs with container libs.
Reply
#4
Trying asdf to pin PHP felt good in theory, but the deps still fought me; I dropped it and went with a single PHP version for dev.
Reply
#5
For me the real blocker was database client libraries; I swapped to SQLite in dev and used a simple docker-compose to mimic MySQL.
Reply
#6
Concrete action I took: cleaned caches, restarted the shell, and kept the system libraries separate; sometimes the symlink pointed to a keg that didn't exist and a restart fixed it.
Reply
#7
Question: do you actually need the full PHP toolchain on the host, or would Docker/Sail cover the dev environment?
Reply


[-]
Quick Reply
Message
Type your reply to this message here.

Image Verification
Please enter the text contained within the image into the text box below it. This process is used to prevent automated spam bots.
Image Verification
(case insensitive)

Forum Jump: