Mac:似乎未安装Xcode的命令行工具

时间:2020-02-23 14:45:03  来源:igfitidea点击:

在Mac上使用Xcode(以MacPort为例)最终可能会出现以下错误:

Warning: The Command Line Tools for Xcode don't appear to be installed; most ports will likely fail to build.

一旦安装了Xcode,就需要从" Xcode下载组件"首选项面板中手动安装命令行工具。

Open Xcode
 Click on Xcode menu and then Preferences
 Locate the Download icon and then the Components tab
 Click on Command Line Tools and then the Install button.

命令行工具组件约为180 Mb。
一旦下载并安装,该错误应该消失了。