0 0

Memcache集群代理服务magent安装错误:0

Memcache集群代理服务magent安装错误:

[root@localhost ~]# cd /usr/tools/magent/
[root@localhost magent]# ls
ketama.c  ketama.h  magent-0.5.tar.gz  magent.c  Makefile
[root@localhost magent]# /sbin/ldconfig
[root@localhost magent]# sed -i "s#LIBS = -levent#LIBS = -levent -lm#g" Makefile
[root@localhost magent]# make
gcc -Wall -O2 -g  -c -o magent.o magent.c
magent.c:123: error: field ‘ev’ has incomplete type
magent.c:153: error: field ‘ev’ has incomplete type
magent.c: In function ‘put_server_into_pool’:
magent.c:521: error: invalid application of ‘sizeof’ to incomplete type ‘struct event’
magent.c: In function ‘out_string’:
magent.c:698: warning: implicit declaration of function ‘event_set’
magent.c: In function ‘do_transcation’:
magent.c:815: error: invalid application of ‘sizeof’ to incomplete type ‘struct event’
magent.c: In function ‘start_backup_transcation’:
magent.c:901: error: invalid application of ‘sizeof’ to incomplete type ‘struct event’
magent.c: In function ‘try_backup_server’:
magent.c:993: error: invalid application of ‘sizeof’ to incomplete type ‘struct event’
magent.c: In function ‘server_accept’:
magent.c:1733: error: invalid application of ‘sizeof’ to incomplete type ‘struct event’
magent.c: In function ‘main’:
magent.c:2105: warning: implicit declaration of function ‘event_init’
magent.c:2120: warning: implicit declaration of function ‘event_loop’
make: *** [magent.o] Error 1
[root@localhost magent]#

在此之前还有一些路劲错误
In file included from magent.c:64:
/usr/local/libevent/include/event2/event.h:187:33: error: event2/event-config.h: No such file or directory
/usr/local/libevent/include/event2/event.h:198:25: error: event2/util.h: No such file or directory
In file included from magent.c:64:
修改文件中的路劲之后,不在出现。

但是出现如图所示错误不知是怎么回事。

安装magent之前,已经安装了libevent,并正确安装。

安装magent命令如下:
tar zxvf magent-0.5.tar.gz
/sbin/ldconfig
sed -i "s#LIBS = -levent#LIBS = -levent -lm#g" Makefile
make
cp magent /usr/bin/magent
cd ../

错误是在make时候报出的。

请做过的朋友分析分析。

谢谢!

2012年11月01日 15:22
目前还没有答案

相关推荐

Global site tag (gtag.js) - Google Analytics