dyld:找不到符号:_OBJC_IVAR _ $ _ NSTextViewIvars.sharedData

时间:2018-10-29 21:32:17

标签: xcode git github terminal

最近升级到最新版本的MacOS,在尝试使用Git时遇到以下问题。我了解这与Xcode开发工具无法正确访问有关。

这就是正在发生的事情:

Mitchells-MBP:~ Mitch$ git
dyld: Symbol not found: _OBJC_IVAR_$_NSTextViewIvars.sharedData
  Referenced from: /Applications/Xcode.app/Contents/SharedFrameworks/DVTDocumentation.framework/Versions/A/../../../../SharedFrameworks/DVTKit.framework/Versions/A/DVTKit
  Expected in: /System/Library/Frameworks/AppKit.framework/Versions/C/AppKit
 in /Applications/Xcode.app/Contents/SharedFrameworks/DVTDocumentation.framework/Versions/A/../../../../SharedFrameworks/DVTKit.framework/Versions/A/DVTKit
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
Mitchells-MBP:~ Mitch$ sudo xcode-select -switch /Library/Developer/CommandLineTools/
xcode-select: error: invalid developer directory '/Library/Developer/CommandLineTools/'
Mitchells-MBP:~ Mitch$ sudo /usr/bin/xcode-select -switch /Library/Developer/CommandLineTools/
xcode-select: error: invalid developer directory '/Library/Developer/CommandLineTools/'
Mitchells-MBP:~ Mitch$ sudo /usr/bin/xcode-select -switch /Library/Developer/
xcode-select: error: invalid developer directory '/Library/Developer/'
Mitchells-MBP:~ Mitch$ sudo xcode-select -switch /Library/Developer/
xcode-select: error: invalid developer directory '/Library/Developer/'
Mitchells-MBP:~ Mitch$ 

我不知道还有什么尝试...确实需要将一些东西上传到GitHub。谢谢!

2 个答案:

答案 0 :(得分:0)

我遇到了同样的问题,我通过重新安装XCode来解决了

答案 1 :(得分:0)

我认为这是xcode告诉您不喜欢您的OSX版本的方法。尝试在osx 10.14 Mojave上运行xcode 7时遇到了这个问题