【问题标题】:valgrind: tool 'memcheck' not installedvalgrind:未安装工具“memcheck”
【发布时间】:2014-01-19 11:45:12
【问题描述】:

我是编程新手,正在学习http://c.learncodethehardway.org/book/ex4.html 上的教程,该教程向您展示了如何安装 valgrind。我已经编译了应该显示内存泄漏的示例程序

#include <stdio.h>

/* Warning: This program is wrong on purpose. */

int main()
{
    int age = 10;
    int height;

    printf("I am %d years old.\n");
    printf("I am %d inches tall.\n", height);

    return 0;
}

但是当我输入时

    $ valgrind ./ex4

我收到消息

    valgrind: tool 'memcheck' not installed (/usr/local/lib/valgrind/memcheck-amd64-darwin) (No such file or directory)

当我查看该目录时,没有 memcheck 文件。安装程序没有用吗?

【问题讨论】:

  • 安装程序没有工作吗?”看起来像。
  • 是的,@alk 是对的。删除了最新版本 3.9.0 并安装了教程 3.6.1 中的版本,并且 memcheck 可以正常工作。谢谢

标签: c valgrind


【解决方案1】:

安装程序没有工作吗?”看起来像。 – 阿尔克

是的@alk 是对的。删除了最新版本 3.9.0 并安装了教程 3.6.1 中的版本,并且 memcheck 可以正常工作。谢谢 - j_hindsight

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 2014-04-08
    • 2013-03-29
    • 2011-07-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2011-04-08
    相关资源
    最近更新 更多