Recently I upgraded to MacOS High Sierra (10.13.4). After upgrade my homebrew seems to have stopped working. So I uninstalled the homebrew by executing the below command
ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/uninstall)"
I tried to install homebrew again by executing the below command
/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
But the installation failed with the error as discussed here.
Then I tried executing the command as suggested in the above issue.
sudo chown -R $USER:admin /usr/local
But it did not work because of the issue discussed here.
I executed the below command as suggested above
sudo chown -R $(whoami) $(brew --prefix)/*
It gave me some
Operation not permitted warnings.
Then I again tried to install homebrew. Now it is showing me the below logs in console
... ==> Installation successful! ==> Homebrew has enabled anonymous aggregate user behaviour analytics. Read the analytics documentation (and how to opt-out) here: https://docs.brew.sh/Analytics.html ==> Next steps: - Run `brew help` to get started - Further documentation: https://docs.brew.sh sudo: /etc/sudoers is owned by uid 504, should be 0 sudo: no valid sudoers sources found, quitting sudo: unable to initialize policy plugin
Can some one let me know what does the last set of warnings / errors denote? Can these be ignored?