macOS Mojave 10.14 无法安装brew缺少Command Line Tools for Xcode的解决办法

在Xcode 10.1上安装brew时遇到问题,由于新版本Xcode不再自动安装Command Line Tools。解决方法是手动下载对应版本的Command Line Tools。进入Xcode的「Open Developer Tool」-「More Developer Tools」,使用appleID下载并安装,完成后即可成功安装brew。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

 

问题描述:

首先我的版本是 Xcode 10.1

如果按照以前的方法安装brew

复制
1
/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"

就会一直卡在这句话Downloading Command Line Tools (macOS Mojave version 10.14) for Xcode,然后接着就Failed了,
Error downloading Command Line Tools (macOS Mojave version 10.14) for Xcode:

因为Xcode的新版本不自动安装Command Line Tools了

问题解决:

试了很多很多方法都没有到点子上。。最后在一个偏僻的犄角旮

Last login: Sat Jun 21 20:42:32 on ttys000 huangzongqian@huangzongqiandeMacBook-Pro ~ % brew tap probezy/core && brew install cpolar ==> Auto-updating Homebrew... Adjust how often this is run with HOMEBREW_AUTO_UPDATE_SECS or disable with HOMEBREW_NO_AUTO_UPDATE. Hide these hints with HOMEBREW_NO_ENV_HINTS (see `man brew`). ==> Fetching probezy/core/cpolar ==> Downloading https://www.cpolar.com/static/downloads/releases/3.3.18/cpolar-s Already downloaded: /Users/huangzongqian/Library/Caches/Homebrew/downloads/3695a11b9f9ff6dec163b72430411aab72ce3e4b5b16c2d9a7bbd19c2a2fd783--cpolar-stable-darwin-arm64.zip ==> Installing cpolar from probezy/core Warning: A newer Command Line Tools release is available. Update them from Software Update in System Settings. If that doesn't show you any updates, run: sudo rm -rf /Library/Developer/CommandLineTools sudo xcode-select --install Alternatively, manually download them from: https://developer.apple.com/download/all/. You should download the Command Line Tools for Xcode 15.2. This is a Tier 2 configuration: https://docs.brew.sh/Support-Tiers#tier-2 Do not report any issues to Homebrew/* repositories! Read the above document instead before opening any issues or PRs. 🍺 /opt/homebrew/Cellar/cpolar/3.3.18: 4 files, 18.9MB, built in 0 seconds ==> Running `brew cleanup cpolar`... Disable this behaviour by setting HOMEBREW_NO_INSTALL_CLEANUP. Hide these hints with HOMEBREW_NO_ENV_HINTS (see `man brew`). huangzongqian@huangzongqiandeMacBook-Pro ~ %
最新发布
06-22
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值