Xcode命令行工具Command Line Tools

一般Xcode安装后,第一次打开时,会弹窗提示安装Command Line Tools,直接安装即可。

如果当时没有安装,后面也可以单独安装。

1
2
3
xcode-select --install	// 安装命令

xcode-select --version // 查看版本

有时Command Line Tools出了问题,可以先尝试恢复默认设置来解决:

1
2
// 恢复默认设置(需要sudo权限)
sudo xcode-select --reset

还是解决不了,可以考虑删掉后重新安装:

1
2
3
4
5
// 强制删除安装目录下的文件
sudo rm -rf /Library/Developer/CommandLineTools

// 重新安装
xcode-select --install

除了终端命令的安装方式,也可以到苹果开发者官网的下载专区搜索Command Line Tools并下载安装包。你也可以去xcodereleases网站找到各种版本Xcode的下载链接。

Xcode命令行工具Command Line Tools

http://tux.red/2023/08/02/xcode-command-line-tools/

作者

redtux

发布于

2023-08-02

更新于

2024-01-31

许可协议

You need to set install_url to use ShareThis. Please set it in _config.yml.
You forgot to set the business or currency_code for Paypal. Please set it in _config.yml.

评论

You forgot to set the shortname for Disqus. Please set it in _config.yml.