gpt4 book ai didi

c - 尝试安装 valgrind 但卡在 make valgrind,怎么办?

转载 作者:太空宇宙 更新时间:2023-11-04 08:26:40 26 4
gpt4 key购买 nike

这可能是一个愚蠢的问题,实际上我才刚刚开始。我正在关注 LCTHW 的教程

我正在尝试安装valgrind,作者指定了步骤:

1)下载(没有curl就用wget)

curl -O http://valgrind.org/downloads/valgrind-3.6.1.tar.bz2

使用 md5sum 确保它与网站上的匹配

md5sum valgrind-3.6.1.tar.bz2

2) 解压。

tar -xjvf valgrind-3.6.1.tar.bz2

cd 进入新创建的目录

cd valgrind-3.6.1

3) 配置

./配置

4) 成功

制作

5) 安装它(需要root)

sudo 进行安装

我卡在了第4步,这里要做什么?命令应该是什么样的?我以前做过c程序,但我需要指定这里的哪个文件?

这是我运行 make 时得到的结果:

Blackbeard@PC-DEV-A179:~/valgrind-3.6.1$ make
make: *** No targets specified and no makefile found. Stop.

编辑:

正如 user43250937 指出的那样,./configure 无法正常工作,我得到以下信息:

$ ./configure
checking for a BSD-compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
checking for a thread-safe mkdir -p... /bin/mkdir -p
checking for gawk... gawk
checking whether make sets $(MAKE)... yes
checking whether to enable maintainer-specific portions of Makefiles... no
checking whether ln -s works... yes
checking for gcc... gcc
checking whether the C compiler works... yes
checking for C compiler default output file name... a.out
checking for suffix of executables...
checking whether we are cross compiling... no
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether gcc accepts -g... yes
checking for gcc option to accept ISO C89... none needed
checking for style of include used by make... GNU
checking dependency style of gcc... gcc3
checking whether gcc and cc understand -c and -o together... yes
checking how to run the C preprocessor... gcc -E
checking for g++... g++
checking whether we are using the GNU C++ compiler... yes
checking whether g++ accepts -g... yes
checking dependency style of g++... gcc3
checking for ranlib... ranlib
checking for a sed that does not truncate output... /bin/sed
checking for ar... /usr/bin/ar
checking for perl... /usr/bin/perl
checking for gdb... /usr/bin/gdb
checking dependency style of gcc... gcc3
checking for diff -u... yes
checking for a supported version of gcc... ok (4.8.2)
checking build system type... x86_64-unknown-linux-gnu
checking host system type... x86_64-unknown-linux-gnu
checking for a supported CPU... ok (x86_64)
checking for a 64-bit only build... no
checking for a 32-bit only build... no
checking for a supported OS... ok (linux-gnu)
checking for the kernel version... unsupported (3.13.0-49-generic)
configure: error: Valgrind works on kernels 2.4, 2.6

我正在运行 Ubuntu 14.04 LTS

最佳答案

第 3 步(配置)可能由于缺少依赖项/库而未正确完成,请检查该命令的输出。

编辑:您需要支持内核 3.x 的较新版本的 Valgrind,现在它们位于 valgrind-3.10.1,这将起作用。

关于c - 尝试安装 valgrind 但卡在 make valgrind,怎么办?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/30185971/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com