libmemcached编译错误
libmemcached编译错误
1 问题描述
为了对memcached进行压力测试,选择了libmemcached中的memslab。编译过程中出现如下错误:
CXX libmemcached/csl/libmemcached_libmemcached_la-context.lo In file included from ./libmemcached/common.h:114, from ./libmemcached/csl/common.h:50, from libmemcached/csl/context.cc:38: ./libmemcached-1.0/memcached.h:46:23: error: cinttypes: No such file or directory make[1]: *** [libmemcached/csl/libmemcached_libmemcached_la-context.lo] Error 1 make[1]: Leaving directory `/tmp/libmemcached-1.0.18‘ make: *** [all] Error 2
2 解决
安装如下包:
gcc44
gcc44-c++
libstdc++44-devel
配置编译环境变量:
export CC=/usr/bin/gcc44 export CXX=/usr/bin/g++44
编译参数添加 --with-memcached:
./configure --prefix=/usr/local/libmemcached --with-memcached --enable-memaslap make make install
编译时可选择功能更强大的memaslap
郑重声明:本站内容如果来自互联网及其他传播媒体,其版权均属原媒体及文章作者所有。转载目的在于传递更多信息及用于网络分享,并不代表本站赞同其观点和对其真实性负责,也不构成任何其他建议。