升级Mac系统后,使用shell命令,或者node之类的报错:
1 | xcrun: error: invalid active developer path (/Library/Developer/CommandLineTools), missing xcrun at: /Library/Developer/CommandLineTools/usr/bin/xcrun |
解决方法,重装xcode command line:
1 | xcode-select --install |
如果没有解决问题,执行以下命令
1 | sudo xcode-select -switch / |