dyld找不到DVTFoundation.framework

时间:2013-07-19 13:11:36

标签: xcode macos dyld

我正在尝试将appledoc用于我的一个项目。我下载了项目,在Xcode中构建了项目,并将appledoc二进制文件复制到~/bin。尝试运行二进制文件会出现此错误:

appledoc version: 2.1 (build 858)

!> dyld: Library not loaded: @rpath/DVTFoundation.framework/Versions/A/DVTFoundation
!> Referenced from: /usr/bin/xcrun
!> Reason: image not found
docsetutil failed to index the documentation set, continuing with what was indexed...

这是整个输出。我做了一堆谷歌搜索并没有找到任何东西;我最终删除了Xcode(版本4.6.3,来自Mac App Store)并重新安装。我重建appledoc并再次尝试,但我也遇到了同样的错误。

我认为问题可能是我还安装了Xcode 5开发人员预览版,所以我认为我会使用xcode-select来确保我的构建设置是理智的。但是运行xcode-select -print-path给了我类似的错误:

dyld: Library not loaded: @rpath/DVTFoundation.framework/Versions/A/DVTFoundation
  Referenced from: /usr/bin/xcode-select
  Reason: image not found
Trace/BPT trap

我还尝试使用Xcode 5构建appledoc,结果相同。知道这里可能有什么问题吗?


修改:这是otool -L ~/bin/appledoc的输出:

bin/appledoc:
    /usr/lib/libicucore.A.dylib (compatibility version 1.0.0, current version 51.1.0)
    /usr/lib/libz.1.dylib (compatibility version 1.0.0, current version 1.2.5)
    /System/Library/Frameworks/Foundation.framework/Versions/C/Foundation (compatibility version 300.0.0, current version 1044.0.0)
    /System/Library/Frameworks/Cocoa.framework/Versions/A/Cocoa (compatibility version 1.0.0, current version 20.0.0)
    /System/Library/Frameworks/SystemConfiguration.framework/Versions/A/SystemConfiguration (compatibility version 1.0.0, current version 596.2.0)
    /System/Library/Frameworks/CoreServices.framework/Versions/A/CoreServices (compatibility version 1.0.0, current version 59.0.0)
    /usr/lib/libobjc.A.dylib (compatibility version 1.0.0, current version 228.0.0)
    /usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 1197.1.1)
    /System/Library/Frameworks/AppKit.framework/Versions/C/AppKit (compatibility version 45.0.0, current version 1242.0.0)
    /System/Library/Frameworks/CoreFoundation.framework/Versions/A/CoreFoundation (compatibility version 150.0.0, current version 844.0.0)

otool -L /usr/bin/xcode-select

/usr/bin/xcode-select:
    /System/Library/Frameworks/Foundation.framework/Versions/C/Foundation (compatibility version 300.0.0, current version 945.0.0)
    @rpath/DVTFoundation.framework/Versions/A/DVTFoundation (compatibility version 1.0.0, current version 2091.0.0)
    @rpath/IDEFoundation.framework/Versions/A/IDEFoundation (compatibility version 1.0.0, current version 2102.0.0)
    @rpath/Xcode3Core.ideplugin/Contents/MacOS/Xcode3Core (compatibility version 1.0.0, current version 2110.0.0)
    /usr/lib/libobjc.A.dylib (compatibility version 1.0.0, current version 228.0.0)
    /usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 169.3.0)
    /System/Library/Frameworks/CoreFoundation.framework/Versions/A/CoreFoundation (compatibility version 150.0.0, current version 744.0.0)

1 个答案:

答案 0 :(得分:0)

只需在App Store上更新您的Xcode,如果尚未安装,请安装Xcode。然后执行

sudo xcodebuild -license

在终端上并接受此许可证。