Brew install on Mojave

后端 未结 4 798
广开言路
广开言路 2020-12-13 16:29

I did these steps:

  1. Updated to Mojave
  2. Installed Xcode 10 beta3
  3. Ran this command: sudo xcode-select -switch /Applications/Xcode-beta.app/
4条回答
  •  谎友^
    谎友^ (楼主)
    2020-12-13 16:55

    As of October 2018, the solution for making brew and brew install succeed is to:

    • install latest Xcode fom AppStore
    • run Xcode and install command line tools
    • add the line before to your profile or somethign similar

    export CFLAGS="-I/usr/local/include -L/usr/local/lib -I$(brew --prefix openssl)/include -I$(xcrun --show-sdk-path)/usr/include"

    No need to download Xcode manually, but you may want to remove the beta version if you installed it.

    The magic part is at the end, where xcrun obtains the correct location of the SDK.

提交回复
热议问题