How to avoid “cannot load such file — utils/popen” from homebrew on OSX

前端 未结 9 1584
余生分开走
余生分开走 2020-11-29 14:48

I\'m getting an error when I run brew in the terminal:

 /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/rubygems/core         


        
9条回答
  •  失恋的感觉
    2020-11-29 15:14

    The problem mainly occurs after updating OS X to El Capitan (OS X 10.11) or macOS Sierra (macOS 10.12).

    This is because of file permission issues with El Capitan’s or later macOS's new SIP process. Try changing the permissions for the /usr/local directory:

    $ sudo chown -R $(whoami):admin /usr/local  
    

    If it still doesn't work, use these steps inside a terminal session and everything will be fine:

    cd /usr/local/Library/Homebrew  
    git reset --hard  
    git clean -df
    brew update
    

    This may be because homebrew is not updated.

提交回复
热议问题