macOS 13 (Ventura)安装MongoDB遇CLT兼容错误求助
在macOS 13 (Ventura)上安装MongoDB 5.0/6.0解决CLT不支持错误的可行方案
针对你在macOS 13上安装MongoDB时遇到的「Command Line Tools (CLT) does not support macOS 13」错误,即使重装Xcode 14.1 CLT仍无效的情况,可尝试以下步骤:
重置Xcode选择路径
先重置CLT的系统关联路径,避免路径异常导致的识别问题:sudo xcode-select --reset执行后验证路径是否正确:
xcode-select -p正常输出应为
/Library/Developer/CommandLineTools升级Homebrew到最新版本
旧版Homebrew对Ventura的适配可能存在bug,先升级brew:brew update && brew upgrade清理MongoDB相关缓存后重新安装
清除之前安装失败留下的缓存文件,再重新执行安装:brew cleanup mongodb-community brew install mongodb-community@5.0手动指定CLT路径后重试
如果上述步骤无效,手动指定CLT的安装路径后再安装:sudo xcode-select -s /Library/Developer/CommandLineTools brew install mongodb-community@5.0验证安装结果
安装完成后启动服务并检查状态:brew services start mongodb-community@5.0 brew services list | grep mongodb若显示
started则说明安装成功。
内容的提问来源于stack exchange,提问作者user20240773
相关产品推荐
相关产品推荐

