Cannot install brew on Mojave with Xcode 10

后端 未结 7 1651
野的像风
野的像风 2021-01-31 04:20

I can not install any brew packages on my mac with the following error info.

Installed on my Mac:

  • macOS 10.14 Beta (18A293u)
7条回答
  •  北恋
    北恋 (楼主)
    2021-01-31 04:52

    I was able to install Homebrew on Mojave by manually downloading the command line tools here: https://developer.apple.com/download/more/

    Modify the Homebrew install script here: https://raw.githubusercontent.com/Homebrew/install/master/install

    By replacing:

    def should_install_command_line_tools?
      return false if force_curl?
      return false if macos_version < "10.9"
      !File.exist?("/Library/Developer/CommandLineTools/usr/bin/git") ||
      !File.exist?("/usr/include/iconv.h")
    end
    

    With this:

    def should_install_command_line_tools?
      return true
    end
    

    Then just execute the script.

    This is a little hacky, but it worked for me and could help someone out in the beta period.

提交回复
热议问题