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

 

你可能感兴趣的:(memcached)