xcrun: error: invalid active developer path (/Library/Developer/CommandLineTools), missing xcrun

 

mac报错:

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

 

场景:

使用goland  debug模式运行go代码main方法时,报以上错误,初步分析是xcode 组件缺失了

包括一些其他场景如运行git命令等也有可能出现此错误

解决方法:

打开命令终端运行

xcode-select --install
回车后,系统弹出下载xcode组件,点击确认,下载完成后即可。

mac中很多软件都需要依赖xcode的先关组件。

 

posted @ 2020-01-17 11:34  anobscureretreat  阅读(10893)  评论(0编辑  收藏  举报