CentOS安装FastDfs错误 5C

最近在CentOS上安装FastDFS在 编译时出现
/usr/local/lib/libfastcommon.so: undefined reference to sqrt'
/usr/local/lib/libfastcommon.so: undefined reference to
cos'
错误,请哪位大神帮忙解决一下。
详细错误如下:

 cc -Wall -D_FILE_OFFSET_BITS=64 -D_GNU_SOURCE -g -O -DDEBUG_FLAG -DOS_LINUX -DIOEVENT_USE_EPOLL -o fdfs_trackerd fdfs_trackerd.c  ../common/fdfs_global.o tracker_proto.o tracker_mem.o tracker_service.o tracker_status.o tracker_global.o tracker_func.o fdfs_shared_func.o tracker_nio.o tracker_relationship.o tracker_dump.o ../common/linux_stack_trace.o -L/usr/local/lib  -lpthread -lrt -ldl -rdynamic -lfastcommon -I../common -I/usr/include/fastcommon
/usr/local/lib/libfastcommon.so: undefined reference to `sqrt'
/usr/local/lib/libfastcommon.so: undefined reference to `cos'
collect2: ld 返回 1
make: *** [fdfs_trackerd] 错误 1
cc -Wall -D_FILE_OFFSET_BITS=64 -D_GNU_SOURCE -g -O -DDEBUG_FLAG -DOS_LINUX -DIOEVENT_USE_EPOLL -o fdfs_storaged fdfs_storaged.c  ../common/fdfs_global.o ../tracker/fdfs_shared_func.o ../tracker/tracker_proto.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 trunk_mgr/trunk_mem.o trunk_mgr/trunk_shared.o trunk_mgr/trunk_sync.o trunk_mgr/trunk_client.o trunk_mgr/trunk_free_block_checker.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 -lrt -ldl -rdynamic -lfastcommon -I. -Itrunk_mgr -I../common -I../tracker -I../client -Ifdht_client -I/usr/include/fastcommon
/usr/local/lib/libfastcommon.so: undefined reference to `sqrt'
/usr/local/lib/libfastcommon.so: undefined reference to `cos'
collect2: ld 返回 1
make: *** [fdfs_storaged] 错误 1
cc -Wall -D_FILE_OFFSET_BITS=64 -D_GNU_SOURCE -g -O -DDEBUG_FLAG -DOS_LINUX -DIOEVENT_USE_EPOLL -o fdfs_monitor fdfs_monitor.c  ../common/fdfs_global.o ../common/fdfs_http_shared.o ../common/mime_file_parser.o ../tracker/tracker_proto.o ../tracker/fdfs_shared_func.o ../storage/trunk_mgr/trunk_shared.o tracker_client.o client_func.o client_global.o storage_client.o -lpthread -lrt -ldl -rdynamic -lfastcommon -I../common -I../tracker -I/usr/include/fastcommon
/usr/lib/gcc/i686-redhat-linux/4.4.7/../../../libfastcommon.so: undefined reference to `sqrt'
/usr/lib/gcc/i686-redhat-linux/4.4.7/../../../libfastcommon.so: undefined reference to `cos'

环境:CentOS6.x, FastDFS-5.05

此问题已解决:
此问题是由于 libfastcommon-master 版本问题,改为libfastcommon-1.0.7后,再进行编译就OK了。

1个回答

系统数学类库文件好像link找不到。所以链接失败了

Csdn user default icon
上传中...
上传图片
插入图片
抄袭、复制答案,以达到刷声望分或其他目的的行为,在CSDN问答是严格禁止的,一经发现立刻封号。是时候展现真正的技术了!