1、下载最新版本:官方链接
2、tar -jxvf valgrind-3.15.0.tar.bz2.tar.bz2
3、cd valgrind-3.15.0
4、sudo ./configure
5、sudo make
6、sudo make install
7、sudo /etc/profile.d/valgrind.sh
添加:
LGRIND_ROOT=/home/yinwenbin/software/valgrind-3.15.0
VALGRIND_INCLUDE=/usr/local/include/valgrind
VALGRIND_LIB=/usr/local/lib/valgrind
export VALGRIND_ROOT VALGRIND_INCLUDE VALGRIND_LIB
8、修改文件权限:sudo chmod +x valgrind.sh
9、./valgrind.sh
10、valgrind --version
11、valgrind使用手册:链接