2013-03-30 52 views
8

我正在安裝Valgrind,但遇到一些問題。我的平臺的信息:安裝valgrind,啓動時發生致命錯誤

Linux xx-ThinkPad-X61 3.2.0-39-generic-pae #62-Ubuntu SMP Wed Feb 27 22:25:11 UTC 2013 i686 i686 i386 GNU/Linux 

我跟在Valgrind的文件夾中的README文件的安裝說明。 ./configure - > make - > sudo make install。

我無法理解README文件中的以下提示,我只是忽略了它。出現

Important! Do not move the valgrind installation into a place 
different from that specified by --prefix at build time. This will 
cause things to break in subtle ways, mostly when Valgrind handles 
fork/exec calls. 

鍵入 「Valgrind的ls -l命令」 後,錯誤:

[email protected]:~/Downloads/valgrind-3.8.1$ valgrind ls -l 
==7674== Memcheck, a memory error detector 
==7674== Copyright (C) 2002-2012, and GNU GPL'd, by Julian Seward et al. 
==7674== Using Valgrind-3.8.1 and LibVEX; rerun with -h for copyright info 
==7674== Command: ls -l 
==7674== 

valgrind: Fatal error at startup: a function redirection 
valgrind: which is mandatory for this platform-tool combination 
valgrind: cannot be set up. Details of the redirection are: 
valgrind: 
valgrind: A must-be-redirected function 
valgrind: whose name matches the pattern:  strlen 
valgrind: in an object with soname matching: ld-linux.so.2 
valgrind: was not found whilst processing 
valgrind: symbols from the object with soname: ld-linux.so.2 
valgrind: 
valgrind: Possible fixes: (1, short term): install glibc's debuginfo 
valgrind: package on this machine. (2, longer term): ask the packagers 
valgrind: for your Linux distribution to please in future ship a non- 
valgrind: stripped ld.so (or whatever the dynamic linker .so is called) 
valgrind: that exports the above-named function using the standard 
valgrind: calling conventions for this platform. The package you need 
valgrind: to install for fix (1) is called 
valgrind: 
valgrind: On Debian, Ubuntu:     libc6-dbg 
valgrind: On SuSE, openSuSE, Fedora, RHEL: glibc-debuginfo 
valgrind: 
valgrind: Cannot continue -- exiting now. Sorry. 

可能有人給一些建議嗎?

謝謝!

回答

2

Valgrind表示它不能工作,因爲它缺少libc調試信息, ,它指出必須安裝哪個軟件包才能解決該問題。 你的情況(Ubuntu),你必須安裝 libc6-dbg

+0

,謝謝。我意識到並試圖安裝libc6-dbg。但我的Ubuntu 12.04遇到了x系統的問題,我無法進入GUI。之後我會用valgrind更新我的狀態。 – ulyssis2

+0

你有沒有設法解決這個問題?我安裝libc6-dbg並仍然出現這個錯誤。 –

+0

@Erik:找到了解決這個問題的辦法。 – rashok

10

我也遇到了這個錯誤,但最終以下面的方式解決。

我有64位的Ubuntu 14.04,我的可執行文件是32位。當我用valgrind運行我的32位可執行文件時,我得到了同樣的錯誤。即使安裝了lib6c-dbg(使用命令apt-get install lib6c-dbg),該錯誤仍未解決。

後來我發現像我的機器中存在的lib6c-dbg是64位,valgrind需要32位lib6c-dbg來運行我的32位可執行文件。安裝32位lib6c-dbg(使用命令apt-get install lib6c-dbg:i386)後,它開始工作。

+0

我不得不通過一些箍來在我的amd64機器上添加i386拱門,但之後一切都變得非常簡單。謝謝你的提示。 – Umut