本文已参与「新人创作礼」活动,一起开启掘金创作之路。
中午午休时间,一时兴起,升级了 mac 系统,升级完毕后却发现 git 失效了 :)
xcrun: error: invalid active developer path (/Library/Developer/CommandLineTools), missing xcrun at: /Library/Developer/CommandLineTools/usr/bin/xcrun
下面贴出解决方案:
- 打开苹果的开发者网站,点击
Develop选项 - 点击
Downloads选项 - 点击
More选项 - 输入框输入
Command Line Tools, 点击View Details, 选中dmg下载 - 下载后,打开软件,点击继续,完成安装
- 在终端上,输入
git --version, 查看是否安装完成