美文网首页
mac更新后git不可用

mac更新后git不可用

作者: aimee66 | 来源:发表于2019-12-10 17:45 被阅读0次

更新后报错

错误提示如下:

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/

仍然报错:

xcode-select: error: invalid developer directory '/Library/Developer/CommandLineTools/'

安装xcode-select

xcode-select --install

根据提示的弹框安装xcode-select
再次执行如下命令

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

执行完不报错,ok

相关文章

网友评论

      本文标题:mac更新后git不可用

      本文链接:https://www.haomeiwen.com/subject/zziggctx.html