在vps上编译,出现下面错误。

发布于 2022-09-14 15:41:17 字数 2183 浏览 12 评论 1

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 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

巴黎盛开的樱花 2022-09-18 20:47:59

回复 1# wbteve

很明显,是libevent版本不正确。
详情参阅FAQ:http://linux.chinaunix.net/bbs/thread-1174523-1-3.html

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文