从github上下载源码https://github.com/gperftools/gperftools
git clone https://github.com/gperftools/gperftools
进入源码目录,执行
[root@localhost gperftools-master]# sh autogen.sh
autogen.sh: line 3: autoreconf: command not found
出错,需要安装个autoconf
yum install autoconf automake libtool
执行配置
./configure
编译
make
make install
最后被安装在/usr/local/lib中
tcmalloc库也安装好了