Cannot install brew on Mojave with Xcode 10
You will need to install both "Xcode 10.0 Beta" from https://developer.apple.com/download/ AND "Command Line Tools (macOS 10.14) for Xcode 10 Beta" from
Update contributed by other comments, after you installed "Command Line Tools", you will also need to execute the following command in your terminal.
open /Library/Developer/CommandLineTools/Packages/macOS_SDK_headers_for_macOS_10.14.pkg
Beginning in 10.14, a new step is required to create the header files in /usr/include:
Install /Library/Developer/CommandLineTools/Packages/macOS_SDK_headers_for_macOS_10.14.pkg
Source: The Xcode 10 release notes
After installing CLT, you can ask CLT to add header files to /usr/include
, then homebrew will appropriate detect the Command Line Tools.
installer -pkg /Library/Developer/CommandLineTools/Packages/macOS_SDK_headers_for_macOS_10.14.pkg -target /