Homebrew on Mac Os 10.10 or 10.11 is not working

别等时光非礼了梦想. 提交于 2019-12-21 07:08:06

问题


After installed Homebrew, when I run any brew ***, I keep getting this error:

Homebrew requires Leopard or higher. For Tiger support, see:
https://github.com/mistydemeo/tigerbrew

My Env: Mac OS 10.10(Yosemite)

I checked the brew.rb source, it has:

if MACOS and MACOS_VERSION < 10.5
  abort <<-EOABORT.undent
    Homebrew requires Leopard or higher. For Tiger support, see:
    http://github.com/sceaga/homebrew/tree/tiger
  EOABORT
end

I have no idea why the Yosemite will trigger this version check.


回答1:


Edit the brew.rb file to get this :

# 10.10 stands for Mac OS Yosemite
# 10.11 stands for Mac OS El Capitan
if MACOS and MACOS_VERSION < 10.5 and MACOS_VERSION != 10.1 and MACOS_VERSION != 10.11
  abort <<-EOABORT.undent
    Homebrew requires Leopard or higher. For Tiger support, see:
    http://github.com/sceaga/homebrew/tree/tiger
  EOABORT
end

It'll then install fine.

This is because 10.10 is the same than 10.1 which is below 10.5




回答2:


Above change did not work for me.. it gave the error Error: Mac OS X `10.1' is invalid

I had to change the brew.rb to:

if MACOS_VERSION == 10.10
        MACOS_VERSION = 10.99
end

before

if MACOS and MACOS_VERSION < 10.5


来源:https://stackoverflow.com/questions/26501126/homebrew-on-mac-os-10-10-or-10-11-is-not-working

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