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

前端 未结 9 1595
余生分开走
余生分开走 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:10

    First, open a terminal session and run:

    cd /usr/local/
    git status
    

    to see if Homebrew is clean.

    If it's dirty, run:

    git reset --hard && git clean -df
    

    then

    brew doctor
    brew update
    

    If it's still broken, try this in your session:

    sudo rm /System/Library/Frameworks/Ruby.framework/Versions/Current
    sudo ln -s /System/Library/Frameworks/Ruby.framework/Versions/1.8 /System/Library/Frameworks/Ruby.framework/Versions/Current
    

    This will force Homebrew to use Ruby 1.8 from the system's installation.

提交回复
热议问题