Homebrew找不到已安装的命令行工具

时间:2016-08-06 12:45:17

标签: xcode homebrew

我已经通过Xcode安装了命令行工具。当我运行xcode-select -p时,它显示/Applications/Xcode.app/Contents/Developer

但是,当我运行brew config时,它显示CLT: N/A。当我使用brew更新python时,它显示Warning: Building python from source: The bottle needs the Apple Command Line Tools to be installed.

4 个答案:

答案 0 :(得分:4)

我刚才遇到了同样的问题。运行xcode-select --install以重新安装命令行工具,brew config现在报告CLT: 7.3.1.0.1.1461711523

答案 1 :(得分:1)

由于xcode-select --install没有为我解决问题:

我必须运行列出brew doctor的{​​{1}},包括brew install命令来解决这些问题。运行后,Warning: Some installed formula are missing dependencies.报告的brew config不再是CLT

答案 2 :(得分:1)

使用sudo xcode-select --switch path/to/Xcode.app指定要用于命令行开发人员工具的Xcode,或使用xcode-select --install安装独立的命令行开发人员工具。

答案 3 :(得分:0)

对于以上相同的dependency issuexcode-select --install并在pop-up上单击“安装”可在MacOS Catalina中修复此问题。完成后,您可以在终端中输入xcode-select -v进行确认,并且输出应类似于this