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/

 

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章