brew update broke something?

蹲街弑〆低调 提交于 2019-12-12 08:45:33

问题


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.


回答1:


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




回答2:


Do brew doctor

Examine the output and follow any recommendations given.



来源:https://stackoverflow.com/questions/12240683/brew-update-broke-something

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!