Xcode 安装 Command Line Tools

2023-01-16  本文已影响0人  蓝白七七

在从 App Store 上下载 Xcode 后
默认是不会安装 Command Line Tools 的
Command Line Tools 是在 Xcode 中的一款工具
可以在 命令行 中运行 C 程序、为了学习 Objective-C
现在也来学习一下如何安装 Command Line Tools


具体步骤如下 :
在终端中输入命令 : xcode-select --install
自动下载安装然后点击完成即可、需要一定的时间下载

xcode-select --install      // 安装命令
sudo xcode-select --reset   // 恢复默认设置
sudo rm -rf /Library/Developer/CommandLineTools    // 删除 commandlinetools
xcode-select --version      // 查看版本
Mac  ~ % xcode-select --install
xcode-select: note: install requested for command line developer tools
Mac ~ % xcode-select --install
xcode-select: error: command line tools are already installed, use "Software Update" in System Settings to install updates
上一篇 下一篇

猜你喜欢

热点阅读