Homebrew was working fine and normal till I did a brew update
(haven't update for months). After brew update was finished, every brew
command results in the same/similar error message:
/usr/local/Library/Homebrew/global.rb:6:in `require': no such file to load -- set (LoadError)
from /usr/local/Library/Homebrew/global.rb:6
from /usr/local/bin/brew:17:in `require'
from /usr/local/bin/brew:17
I checked the directory and it seems like the homebrew files are there. It is just not loading the file for some reason. I did a reinstall using git since brew
command doesn't work. But still got the same error.
Any help on how I may resolve this issue is much appreciated. I might have to reinstall the os if I can't figure out anything.
Update: I did a clean install of the OS. Wasn't able to find a solution without reinstalling.
The update-reset version of this command resets all formulae to be identical to the contents of their remote repositories, deleting any local changes. It is only used as a last-resort effort to fix a problem (it's like unplugging Homebrew and plugging it back in).
An easy, convenient way to automatically update Homebrew. This script will run brew update in the background once every 24 hours (by default) until explicitly told to stop, utilising launchd . brew upgrade and brew cleanup can also be handled automatically but are optional flags.
From 20 minutes to an hour. The devs are aware.
I have met the same problem. And the following solved it:
sudo chown -R $USER:admin /usr/local
cd /usr/local
git reset --hard origin/master
brew update
see https://github.com/mxcl/homebrew/issues/19140
Do brew doctor
Examine the output and follow any recommendations given.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With