码迷,mamicode.com
首页 > 系统相关 > 详细

libmemcached编译错误

时间:2015-04-06 11:17:19      阅读:746      评论:0      收藏:0      [点我收藏+]

标签:

 

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

 

libmemcached编译错误

标签:

原文地址:http://www.cnblogs.com/tjm-1990/p/4395514.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!