首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >在macosx中找不到名为“otool”的工具,也找不到任何在./符号代码行115处出现的备用SDK。

在macosx中找不到名为“otool”的工具,也找不到任何在./符号代码行115处出现的备用SDK。
EN

Stack Overflow用户
提问于 2015-10-27 02:06:21
回答 3查看 5.4K关注 0票数 4

我试着分析苹果商店给出的崩溃iOS应用程序崩溃日志,使用符号化的~~~.crash和dSYM文件。然而,当我试图制作crash.log时,我得到了以下错误。你能告诉我如何解决这个问题吗?

代码语言:javascript
复制
$ ./symbolicatecrash ~~~.crash ~~~.dSYM > crash.log

sh: ”/Applications/Xcode.app/Contents/Developer”/usr/bin/xcrun: No such file or directory
Error: can't find tool named 'otool' in the macosx SDK or any fallback SDKs at ./symbolicatecrash line 115.

下面是符号文件

代码语言:javascript
复制
#symbolicatecrash
sub getToolPath {
    my ($toolName, $sdkGuess) = @_;

    if (!defined($sdkGuess)) {
        $sdkGuess = "macosx";
    }

    my $toolPath = `'$DEVELOPER_DIR/usr/bin/xcrun' -sdk $sdkGuess -find $toolName`;
    if (!defined($toolPath) || $? != 0) {
        if ($sdkGuess eq "macosx") {
            die "Error: can't find tool named '$toolName' in the $sdkGuess SDK or any fallback SDKs"; <------ This line is line115
        } elsif ($sdkGuess eq "iphoneos") {
            print STDERR "## Warning: can't find tool named '$toolName' in iOS SDK, falling back to searching the Mac OS X SDK\n";
            return getToolPath($toolName, "macosx");
        } else {
            print STDERR "## Warning: can't find tool named '$toolName' in the $sdkGuess SDK, falling back to searching the iOS SDK\n";
            return getToolPath($toolName, "iphoneos");
        }
    }

    chomp $toolPath;
    print STDERR "$toolName path is '$toolPath'\n" if $opt{v};

    return $toolPath;
}
EN

回答 3

Stack Overflow用户

回答已采纳

发布于 2015-10-27 23:12:33

我用bash(在使用zsh之前)尝试了相同的操作,然后进行得很好。这个问题似乎是由于.zshrc的设置造成的。

票数 -1
EN

Stack Overflow用户

发布于 2015-10-27 02:10:56

1)

在命令行中输入以下内容:

xcode-select --print-path

如果它显示/Application/Xcode.app/Content/Developer的路径,则转到步骤2。如果没有,则使用"sudo xcode-select -s /path/to/your/Xcode/Contents/Developer“文件夹更改路径。

2)

尝试安装Xcode命令行工具,您可以在http://developer.apple.com/xcode站点的“附加工具”链接下获得这些工具。

3)

确保.tcshrc / .bashrc "$PATH“环境变量是正确的。在我的本地机器中,"xcrun“住在"/usr/bin”里,otool也住在"/usr/bin“里。

票数 1
EN

Stack Overflow用户

发布于 2022-03-24 02:51:46

将DEVELOPER_DIR设置为“工作的$ export DEVELOPER_DIR=””

票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/33358799

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档