问题描述
由于以下错误信息,我无法在Mac上安装任何Brew软件包.
I can not install any brew packages on my mac with the following error info.
已安装在我的Mac上:
- macOS 10.14 Beta(18A293u)
- Xcode 9.3(9E145)
- Xcode 10.0 beta(10L176w)
键入brew install xxx
.输出为:
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
但是当我键入xcode-select --install
时,它说它不可用
Xcode选择安装错误
But as I type in xcode-select --install
, it says it is not available
Xcode select install error
Mac上两个版本的Xcode的路径:
Paths of two versions of Xcode on my Mac:
/Applications/Xcode-beta.app
/Applications/Xcode.app
我的配置输出:
xcode-select -p
And my config output:
xcode-select -p
/Applications/Xcode.app/Contents/Developer
酿造配置
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
推荐答案
您将需要同时安装 https://developer.apple.com/download/ AND " 用于Xcode 10 Beta的命令行工具(macOS 10.14)"来自
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
这篇关于无法使用Xcode 10在Mojave上安装brew的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!