关于fastDFS安装过程出现的问题

关于fastDFS安装过程出现的问题

解压fastDFS安装包,执行./make sh命令后,发现编译出错

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 -ldl -rdynamic -lfastcommon -I…/common -I/usr/include/fastcommon
/usr/bin/ld: cannot find -lfastcommon
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 -ldl -rdynamic -lfastcommon -I. -Itrunk_mgr -I…/common -I…/tracker -I…/client -Ifdht_client -I/usr/include/fastcommon
/usr/bin/ld: cannot find -lfastcommon
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 -ldl -rdynamic -lfastcommon -I…/common -I…/tracker -I/usr/include/fastcommon
/usr/bin/ld: cannot find -lfastcommon
collect2: ld 返回 1
make: *** [fdfs_monitor] 错误 1

后来发现的一种解决方式:
创建软链接
ln -s /usr/lib64/libfastcommon.so /usr/local/lib/libfastcommon.so

ln -s /usr/lib64/libfastcommon.so /usr/lib/libfastcommon.so

或者有可能是fastDFS的依赖安装不全等问题,如:
安装libevent依赖: yum install libevent-devel.x86_64

评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值