Dyldinfo命令未找到。

3

mac os 10.13.4

我在终端输入了命令“dyldinfo”,但是提示出错-bash: dyldinfo: command not found

enter image description here

希望你能够帮忙解决。

3个回答

4

在最近版本的 macOS 上,只要安装了 Xcode,就可以使用 xcrun dyldinfo 工具运行它。


3
首先,请确保您已安装Xcode命令行工具(Command Line Tools)
如果您已经安装了其中一个工具,您可以在/Library/Developer/CommandLineTools/usr/bin找到dyldinfo。 因此,要运行它,请在bash中输入以下内容:
/Library/Developer/CommandLineTools/usr/bin/dyldinfo

1
您可以使用以下命令检查dyldinfo路径:
$ xcrun --sdk dyldinfo

/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/dyldinfo

展示命令dyldinfo的路径为:/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/dyldinfo,这意味着像dyldinfo这样的命令属于Xcode的工具链。因此,'dyldinfo'不能作为单独的shell命令使用。相反,您必须使用xcrun <sdk>来调用它。

$ xcrun dyldinfo

Usage: dyldinfo [-arch <arch>] <options> <mach-o file>
    -dylibs           print dependent dylibs
    -dr               print dependent dylibs and show any recorded DR info
    -rebase           print addresses dyld will adjust if file not loaded at preferred address
    -bind             print addresses dyld will set based on symbolic lookups
    -weak_bind        print symbols which dyld must coalesce
    -lazy_bind        print addresses dyld will lazily set on first use
    -export           print addresses of all symbols this file exports
    -opcodes          print opcodes used to generate the rebase and binding information
    -function_starts  print table of function start addresses
    -export_dot       print a GraphViz .dot file of the exported symbols trie
    -data_in_code     print any data-in-code information

网页内容由stack overflow 提供, 点击上面的
可以查看英文原文,
原文链接