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

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

    To me it feels like you have missing header files for popen, which is a C system library.

    Check if you have installed xcode successful with the command line tools and have accepted the license.

    See this thread for more information: How to install Xcode Command Line Tools

    0 讨论(0)
  • 2020-11-29 15:24

    First I executed:

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

    Then:

    cd $(brew --prefix) && git fetch origin && git reset --hard origin/master
    
    0 讨论(0)
  • 2020-11-29 15:25

    To restore your Homebrew setup try this:

    cd /usr/local/Homebrew/Library && git stash && git clean -d -f && git reset --hard && git pull
    
    0 讨论(0)
提交回复
热议问题