Getting a “bad interpreter” error when using brew

前端 未结 12 1528
半阙折子戏
半阙折子戏 2020-12-01 14:13

I\'m getting this error when I try to run any brew command.

Holger-Sindbaeks-MacBook-Air:~ holgersindbaek$ brew help
-bash: /usr/local/bin/brew: /usr/bin/rub         


        
12条回答
  •  被撕碎了的回忆
    2020-12-01 14:17

    I got the same issue when updated to MacOSX High Sierra & using Xcode 9 with that. High Sierra update ruby gem to version 2.3 but xcpreety command of Xcode 9 still using Ruby 2.0 which is unable to find now & gives bad interpreter. Just go to Terminal & run

    sudo gem install xcpretty
    

    Restart Xcode & do fresh clean build it works for me. Hope it helps!!!

提交回复
热议问题