Brew update broke?

Homebrew worked fine and fine until I did a brew update (I haven’t been updating for several months). After the brew update has been completed, each brew command causes 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 that there are homebrew files there. For some reason, this just doesn't load the file. I reinstalled using git since the brew command does not work. But still the same mistake.

Any help on how I can solve this problem is greatly appreciated. I may have to reinstall the OS if I can’t understand anything.

Update: I performed a clean install of the OS. Could not find a solution without reinstalling.

+6
source share
2 answers

I ran into the same problem. And the following allowed 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

+20
source

Do brew doctor

Study the conclusion and follow the recommendations.

+3
source

Source: https://habr.com/ru/post/924412/


All Articles