magent编译及常见错误解决办法
By admin
- One minute read - 94 words# 编译magent
cd /home/lnmp/src mkdir magent cd magent/ wget http://memagent.googlecode.com/files/magent-0.5.tar.gz tar zxvf magent-0.5.tar.gz /sbin/ldconfig && sed -i “s#LIBS = -levent#LIBS = -levent -lm#g” Makefile make mkdir -p /usr/local/webserver/magent/bin cp magent /usr/local/webserver/magent/bin/magent cd ../
错误1:
gcc -lrt -Wall -g -O2 -I/usr/local/include -m64 -c -o magent.o magent.c magent.c: In function ‘writev_list’: magent.c:729: error: ‘SSIZE_MAX’ undeclared (first use in this function) magent.c:729: error: (Each undeclared identifier is reported only once magent.c:729: error: for each function it appears in.) make: *** [magent.o] Error 1
解决办法:
vim ketama.h
在文件头号部加入
#ifndef SSIZE_MAX #define SSIZE_MAX 32767 #endif
然后再make即可.
相关教程:
memcached 集群单点故障解决方案: