MacOS 更新系统或XCode后Terminal使用Git报错的问题

更新了XCode后,在Terminal使用git,发现报错:

dyld: Library not loaded: @rpath/libswiftCore.dylib
  Referenced from: /Applications/Xcode.app/Contents/Developer/usr/bin/xcodebuild
  Reason: image not found
git: error: unable to locate xcodebuild, please make sure the path to the Xcode folder is set correctly!
git: error: You can set the path to the Xcode folder using /usr/bin/xcode-select -switch

解决方法很简单

sudo xcode-select --switch /Library/Developer/CommandLineTools/

 

你可能感兴趣的:(linux)