Featured image of post 更新 mac 系统,造成 git 无法使用

更新 mac 系统,造成 git 无法使用

1
xcrun: error: invalid active developer path (/Library/Developer/CommandLineTools), missing xcrun at: /Library/Developer/CommandLineTools/usr/bin/xcrun

前几天发现mac系统更新了。〜 于是秉着 “mac升级了更好用的” 感觉升级了系统。
结果,今天在用 go get 时出现以上错误。

查看资料后发现,mac系统在升级的时候Xcode会被卸载…(第一次升级mac的程序猿也是伤不起。:joy: )

算了,先解决问题,mmp项目还等着写bug呢。

1
xcode-select  --install

通过终端重新安装的Xcode命令行工具使用(其实这里安装的是Command Line Tools, Command Line Tools是在Xcode中的一款工具)

执行之后〜

1
go get ***

问题解决