Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Cannot install brew on Mojave with Xcode 10

Tags:

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

Installed on my Mac:

  • macOS 10.14 Beta (18A293u)
  • Xcode 9.3 (9E145)
  • Xcode 10.0 beta (10L176w)

Type in brew install xxx. The output is:

Error: Your Xcode (9.3) is too outdated. Please update to Xcode 10.0 (or delete it). Xcode can be updated from https://developer.apple.com/download/more/  Error: Xcode alone is not sufficient on Mojave. Install the Command Line Tools: xcode-select --install 

But as I type in xcode-select --install, it says it is not available
Xcode select install error

Paths of two versions of Xcode on my Mac:

/Applications/Xcode-beta.app /Applications/Xcode.app 

And my config output:
xcode-select -p

/Applications/Xcode.app/Contents/Developer      

brew config

HOMEBREW_VERSION: 1.6.7 ORIGIN: https://github.com/Homebrew/brew HEAD: 22e9fd772926e389e264cfb328c3d810b06759f9 Last commit: 5 days ago Core tap ORIGIN: https://github.com/Homebrew/homebrew-core Core tap HEAD: 854bb90b366169915849fc9a83e941b8883cea1f Core tap last commit: 6 hours ago HOMEBREW_PREFIX: /usr/local CPU: octa-core 64-bit haswell Homebrew Ruby: 2.3.6 =>./System/Library/Frameworks/Ruby.framework/Versions/2.3/usr/bin/ruby Clang: 9.1 build 902 Git: 2.15.1 => /Applications/Xcode.app/Contents/Developer/usr/bin/git Curl: 7.54.0 => /usr/bin/curl Java: 1.8.0_131 macOS: 10.14-x86_64 CLT: N/A Xcode: 9.3 XQuartz: N/A 
like image 894
Weslie Avatar asked Jun 10 '18 02:06

Weslie


People also ask

Does brew support Mojave?

The most significant changes since 1.7. 0 are official Mojave support, linkage auto-repair on brew upgrade , brew info displaying analytics data and quarantining Cask's downloads.

Do you need Xcode on Mac for Homebrew?

Install Xcode Command Line Tools Xcode is an integrated development environment for macOS, and it contains tools that Homebrew needs to function properly. Note: Xcode is often a prerequisite for installing and using various tools, such as PuTTY, a telnet and SSH client on Mac.

How do I know if Xcode is installed on my Mac?

We'll use Finder to find out if XCode is installed. In Finder, select the Go pull-down menu, and select Applications. Or just use the short-cut key Command-Shift-A while Finder is active. This should open a new Finder window, showing all the Applications installed on your machine.


Video Answer


1 Answers

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

https://download.developer.apple.com/Developer_Tools/Command_Line_Tools_macOS_10.14_for_Xcode_10/Command_Line_Tools_macOS_10.14_for_Xcode_10.dmg

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 
like image 68
joseph Avatar answered Sep 24 '22 15:09

joseph