Xcode命令行工具CommandLineTools 安装

2019-10-26  本文已影响0人  快马临渊

1、在Mac上,我们用Xcode开发iOS软件,有时需要用到CommandLineTools这个工具才行。一般情况下,Xcode会自带CommandLineTools,有时候会不小心删掉,或者发现找不到,那么如何安装这个工具,下面来看下。

打开终端,输入命令:xcode-select --install

如果返回信息xcode-select: error: command line tools are already installed, use "Software Update" to install updates

那么代表本机已安装CommandLineTools,如果想删掉旧的,重新安装,可以在终端输入命令:sudo rm -rf /Library/Developer/CommandLineTools,输入本机密码,回车

如果本机没有安装过CommandLineTools,则会显示下图

点击同意后悔进入安装状态,等待几分钟,就会安装好了。

2、访问Apple 开发者工具页面,用 apple ID 登录后,下载CommandLineTools。里面包含各个版本Xcode的CommandLineTools,用户可以根据需要下载。

上一篇 下一篇

猜你喜欢

热点阅读