Closed MarGul closed 3 years ago
Solved the issue by updating xcode (When running brew doctor
make sure it says "Ready to brew"). Then I removed uninstalled brew using the command /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/uninstall.sh)"
. Then I removed everything in /usr/local
by doing sudo -rf /usr/local/*
to make sure that I had removed everything from brew.
When this was done I reinstalled brew with the new xcode up to date and then reinstalled laravel valet again and it worked. When I run brew services list
it still says error on nginx but it's working now.
▶ brew services list
Name Status User Plist
dnsmasq unknown root /Library/LaunchDaemons/homebrew.mxcl.dnsmasq.plist
nginx error root /Library/LaunchDaemons/homebrew.mxcl.nginx.plist
php started root /Library/LaunchDaemons/homebrew.mxcl.php.plist
Clear description of your problem
I get an error on nginx after multiple tries to reinstall both laravel valet and brew. The error that I get from nginx is:
nginx: [emerg] bind() to 127.0.0.1:80 failed (48: Address already in use)
. When I try to go to one of my sites I getERR_CONNECTION_REFUSED
probably because nginx is not running properly.Output
When I run
brew services list
I get:As you can see there is an error on nginx. When I run
sudo /usr/local/opt/nginx/bin/nginx -g 'daemon off;'
I get this output:so it looks like there is another nginx process started somehow? When I run
sudo lsof -i tcp:80
I get this:If I'm doing
ps aux | grep "nginx"
I get this:I have run out of things to try and I'm close to reinstalling MacOS which would be crazy just to get Laravel valet to work. Like I said I have tried to uninstall Laravel valet in all different ways multiple times, rebooting, stopping the nginx services, uninstalling brew.
Please if someone can point me in the right direction that would be amazing.
Diagnosis