在vps上编译,出现下面错误。
vps2ericwang:/home/soft/FastDFS# ./make.sh
cc -Wall -O -D_FILE_OFFSET_BITS=64 -D_GNU_SOURCE -g -DDEBUG_FLAG -DOS_LINUX -o fdfs_trackerd fdfs_trackerd.c ../common/hash.o ../common/chain.o ../common/base64.o ../common/shared_func.o ../common/ini_file_reader.o ../common/logger.o ../common/sockopt.o ../common/fdfs_global.o ../common/sched_thread.o ../common/http_func.o ../common/pthread_func.o ../common/md5.o tracker_proto.o tracker_mem.o tracker_service.o tracker_status.o tracker_global.o tracker_func.o fast_task_queue.o tracker_nio.o tracker_dump.o ../common/linux_stack_trace.o -L/usr/local/lib -lpthread -ldl -rdynamic -levent -I../common -I/usr/local/include
tracker_service.o: In function `tracker_service_init':
/home/soft/FastDFS/tracker/tracker_service.c:93: undefined reference to `event_base_new'
collect2: ld returned 1 exit status
make: *** [fdfs_trackerd] Error 1
cc -Wall -O -D_FILE_OFFSET_BITS=64 -D_GNU_SOURCE -g -DDEBUG_FLAG -DOS_LINUX -o fdfs_storaged fdfs_storaged.c ../common/hash.o ../common/chain.o ../common/shared_func.o ../common/ini_file_reader.o ../common/logger.o ../common/sockopt.o ../common/fdfs_global.o ../common/base64.o ../common/sched_thread.o ../common/local_ip_func.o ../common/http_func.o ../common/md5.o ../common/pthread_func.o ../tracker/tracker_proto.o ../tracker/fast_task_queue.o tracker_client_thread.o storage_global.o storage_func.o storage_service.o storage_sync.o storage_nio.o storage_dio.o storage_ip_changed_dealer.o storage_param_getter.o storage_disk_recovery.o ../client/client_global.o ../client/tracker_client.o ../client/storage_client.o ../client/client_func.o fdht_client/fdht_proto.o fdht_client/fdht_client.o fdht_client/fdht_func.o fdht_client/fdht_global.o storage_dump.o ../common/linux_stack_trace.o -L/usr/local/lib -lpthread -ldl -rdynamic -levent -I../common -I../tracker -I../client -Ifdht_client -I/usr/local/include
storage_service.o: In function `storage_service_init':
/home/soft/FastDFS/storage/storage_service.c:1100: undefined reference to `event_base_new'
collect2: ld returned 1 exit status
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
回复 1# wbteve
很明显,是libevent版本不正确。
详情参阅FAQ:http://linux.chinaunix.net/bbs/thread-1174523-1-3.html