免费注册 查看新帖 |

Chinaunix

  平台 论坛 博客 文库
12下一页
最近访问板块 发新帖
查看: 12156 | 回复: 13

[FastDFS] ubuntu 11.10 64bit安装FASTDFS报错的问题 [复制链接]

论坛徽章:
0
发表于 2011-05-27 10:39 |显示全部楼层
环境:Linux snsfile35 2.6.38-8-server #42-Ubuntu SMP Mon Apr 11 03:49:04 UTC 2011 x86_64 x86_64 x86_64 GNU/Linux

报错信息:
root@snsfile35:/data/soft/FastDFS# ./make.sh
nm: '/usr/lib/libc_r.so': No such file
cc -Wall -O -D_FILE_OFFSET_BITS=64 -g -DDEBUG_FLAG -DOS_LINUX -c -o ../common/hash.o ../common/hash.c  -I../common -I/usr/local/include
cc -Wall -O -D_FILE_OFFSET_BITS=64 -g -DDEBUG_FLAG -DOS_LINUX -c -o ../common/chain.o ../common/chain.c  -I../common -I/usr/local/include
cc -Wall -O -D_FILE_OFFSET_BITS=64 -g -DDEBUG_FLAG -DOS_LINUX -c -o ../common/base64.o ../common/base64.c  -I../common -I/usr/local/include
cc -Wall -O -D_FILE_OFFSET_BITS=64 -g -DDEBUG_FLAG -DOS_LINUX -c -o ../common/shared_func.o ../common/shared_func.c  -I../common -I/usr/local/include
cc -Wall -O -D_FILE_OFFSET_BITS=64 -g -DDEBUG_FLAG -DOS_LINUX -c -o ../common/ini_file_reader.o ../common/ini_file_reader.c  -I../common -I/usr/local/include
cc -Wall -O -D_FILE_OFFSET_BITS=64 -g -DDEBUG_FLAG -DOS_LINUX -c -o ../common/logger.o ../common/logger.c  -I../common -I/usr/local/include
cc -Wall -O -D_FILE_OFFSET_BITS=64 -g -DDEBUG_FLAG -DOS_LINUX -c -o ../common/sockopt.o ../common/sockopt.c  -I../common -I/usr/local/include
cc -Wall -O -D_FILE_OFFSET_BITS=64 -g -DDEBUG_FLAG -DOS_LINUX -c -o ../common/fdfs_global.o ../common/fdfs_global.c  -I../common -I/usr/local/include
cc -Wall -O -D_FILE_OFFSET_BITS=64 -g -DDEBUG_FLAG -DOS_LINUX -c -o ../common/sched_thread.o ../common/sched_thread.c  -I../common -I/usr/local/include
cc -Wall -O -D_FILE_OFFSET_BITS=64 -g -DDEBUG_FLAG -DOS_LINUX -c -o ../common/http_func.o ../common/http_func.c  -I../common -I/usr/local/include
cc -Wall -O -D_FILE_OFFSET_BITS=64 -g -DDEBUG_FLAG -DOS_LINUX -c -o ../common/pthread_func.o ../common/pthread_func.c  -I../common -I/usr/local/include
cc -Wall -O -D_FILE_OFFSET_BITS=64 -g -DDEBUG_FLAG -DOS_LINUX -c -o ../common/md5.o ../common/md5.c  -I../common -I/usr/local/include
cc -Wall -O -D_FILE_OFFSET_BITS=64 -g -DDEBUG_FLAG -DOS_LINUX -c -o tracker_proto.o tracker_proto.c  -I../common -I/usr/local/include
cc -Wall -O -D_FILE_OFFSET_BITS=64 -g -DDEBUG_FLAG -DOS_LINUX -c -o tracker_mem.o tracker_mem.c  -I../common -I/usr/local/include
cc -Wall -O -D_FILE_OFFSET_BITS=64 -g -DDEBUG_FLAG -DOS_LINUX -c -o tracker_service.o tracker_service.c  -I../common -I/usr/local/include
cc -Wall -O -D_FILE_OFFSET_BITS=64 -g -DDEBUG_FLAG -DOS_LINUX -c -o tracker_status.o tracker_status.c  -I../common -I/usr/local/include
cc -Wall -O -D_FILE_OFFSET_BITS=64 -g -DDEBUG_FLAG -DOS_LINUX -c -o tracker_global.o tracker_global.c  -I../common -I/usr/local/include
cc -Wall -O -D_FILE_OFFSET_BITS=64 -g -DDEBUG_FLAG -DOS_LINUX -c -o tracker_func.o tracker_func.c  -I../common -I/usr/local/include
cc -Wall -O -D_FILE_OFFSET_BITS=64 -g -DDEBUG_FLAG -DOS_LINUX -c -o fast_task_queue.o fast_task_queue.c  -I../common -I/usr/local/include
cc -Wall -O -D_FILE_OFFSET_BITS=64 -g -DDEBUG_FLAG -DOS_LINUX -c -o tracker_nio.o tracker_nio.c  -I../common -I/usr/local/include
cc -Wall -O -D_FILE_OFFSET_BITS=64 -g -DDEBUG_FLAG -DOS_LINUX -c -o tracker_dump.o tracker_dump.c  -I../common -I/usr/local/include
cc -Wall -O -D_FILE_OFFSET_BITS=64 -g -DDEBUG_FLAG -DOS_LINUX -c -o ../common/linux_stack_trace.o ../common/linux_stack_trace.c  -I../common -I/usr/local/include
cc -Wall -O -D_FILE_OFFSET_BITS=64 -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  -ldl -rdynamic -levent -I../common -I/usr/local/include
cc -Wall -O -D_FILE_OFFSET_BITS=64 -g -DDEBUG_FLAG -DOS_LINUX -c -o ../common/local_ip_func.o ../common/local_ip_func.c  -I../common -I../tracker -I../client -Ifdht_client -I/usr/local/include
cc -Wall -O -D_FILE_OFFSET_BITS=64 -g -DDEBUG_FLAG -DOS_LINUX -c -o tracker_client_thread.o tracker_client_thread.c  -I../common -I../tracker -I../client -Ifdht_client -I/usr/local/include
cc -Wall -O -D_FILE_OFFSET_BITS=64 -g -DDEBUG_FLAG -DOS_LINUX -c -o storage_global.o storage_global.c  -I../common -I../tracker -I../client -Ifdht_client -I/usr/local/include
cc -Wall -O -D_FILE_OFFSET_BITS=64 -g -DDEBUG_FLAG -DOS_LINUX -c -o storage_func.o storage_func.c  -I../common -I../tracker -I../client -Ifdht_client -I/usr/local/include
cc -Wall -O -D_FILE_OFFSET_BITS=64 -g -DDEBUG_FLAG -DOS_LINUX -c -o storage_service.o storage_service.c  -I../common -I../tracker -I../client -Ifdht_client -I/usr/local/include
cc -Wall -O -D_FILE_OFFSET_BITS=64 -g -DDEBUG_FLAG -DOS_LINUX -c -o storage_sync.o storage_sync.c  -I../common -I../tracker -I../client -Ifdht_client -I/usr/local/include
cc -Wall -O -D_FILE_OFFSET_BITS=64 -g -DDEBUG_FLAG -DOS_LINUX -c -o storage_nio.o storage_nio.c  -I../common -I../tracker -I../client -Ifdht_client -I/usr/local/include
cc -Wall -O -D_FILE_OFFSET_BITS=64 -g -DDEBUG_FLAG -DOS_LINUX -c -o storage_dio.o storage_dio.c  -I../common -I../tracker -I../client -Ifdht_client -I/usr/local/include
cc -Wall -O -D_FILE_OFFSET_BITS=64 -g -DDEBUG_FLAG -DOS_LINUX -c -o storage_ip_changed_dealer.o storage_ip_changed_dealer.c  -I../common -I../tracker -I../client -Ifdht_client -I/usr/local/include
cc -Wall -O -D_FILE_OFFSET_BITS=64 -g -DDEBUG_FLAG -DOS_LINUX -c -o storage_param_getter.o storage_param_getter.c  -I../common -I../tracker -I../client -Ifdht_client -I/usr/local/include
cc -Wall -O -D_FILE_OFFSET_BITS=64 -g -DDEBUG_FLAG -DOS_LINUX -c -o storage_disk_recovery.o storage_disk_recovery.c  -I../common -I../tracker -I../client -Ifdht_client -I/usr/local/include
cc -Wall -O -D_FILE_OFFSET_BITS=64 -g -DDEBUG_FLAG -DOS_LINUX -c -o ../client/client_global.o ../client/client_global.c  -I../common -I../tracker -I../client -Ifdht_client -I/usr/local/include
cc -Wall -O -D_FILE_OFFSET_BITS=64 -g -DDEBUG_FLAG -DOS_LINUX -c -o ../client/tracker_client.o ../client/tracker_client.c  -I../common -I../tracker -I../client -Ifdht_client -I/usr/local/include
cc -Wall -O -D_FILE_OFFSET_BITS=64 -g -DDEBUG_FLAG -DOS_LINUX -c -o ../client/storage_client.o ../client/storage_client.c  -I../common -I../tracker -I../client -Ifdht_client -I/usr/local/include
cc -Wall -O -D_FILE_OFFSET_BITS=64 -g -DDEBUG_FLAG -DOS_LINUX -c -o ../client/client_func.o ../client/client_func.c  -I../common -I../tracker -I../client -Ifdht_client -I/usr/local/include
cc -Wall -O -D_FILE_OFFSET_BITS=64 -g -DDEBUG_FLAG -DOS_LINUX -c -o fdht_client/fdht_proto.o fdht_client/fdht_proto.c  -I../common -I../tracker -I../client -Ifdht_client -I/usr/local/include
cc -Wall -O -D_FILE_OFFSET_BITS=64 -g -DDEBUG_FLAG -DOS_LINUX -c -o fdht_client/fdht_client.o fdht_client/fdht_client.c  -I../common -I../tracker -I../client -Ifdht_client -I/usr/local/include
cc -Wall -O -D_FILE_OFFSET_BITS=64 -g -DDEBUG_FLAG -DOS_LINUX -c -o fdht_client/fdht_func.o fdht_client/fdht_func.c  -I../common -I../tracker -I../client -Ifdht_client -I/usr/local/include
cc -Wall -O -D_FILE_OFFSET_BITS=64 -g -DDEBUG_FLAG -DOS_LINUX -c -o fdht_client/fdht_global.o fdht_client/fdht_global.c  -I../common -I../tracker -I../client -Ifdht_client -I/usr/local/include
cc -Wall -O -D_FILE_OFFSET_BITS=64 -g -DDEBUG_FLAG -DOS_LINUX -c -o storage_dump.o storage_dump.c  -I../common -I../tracker -I../client -Ifdht_client -I/usr/local/include
cc -Wall -O -D_FILE_OFFSET_BITS=64 -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  -ldl -rdynamic -levent -I../common -I../tracker -I../client -Ifdht_client -I/usr/local/include
cc -Wall -O -D_FILE_OFFSET_BITS=64 -g -DDEBUG_FLAG -DOS_LINUX -c -o ../common/mime_file_parser.o ../common/mime_file_parser.c  -I../common -I../tracker -I/usr/local/include
cc -Wall -O -D_FILE_OFFSET_BITS=64 -g -DDEBUG_FLAG -DOS_LINUX -c -o ../common/fdfs_http_shared.o ../common/fdfs_http_shared.c  -I../common -I../tracker -I/usr/local/include
cc -Wall -O -D_FILE_OFFSET_BITS=64 -g -DDEBUG_FLAG -DOS_LINUX -c -fPIC -o ../common/hash.lo ../common/hash.c  -I../common -I../tracker -I/usr/local/include
cc -Wall -O -D_FILE_OFFSET_BITS=64 -g -DDEBUG_FLAG -DOS_LINUX -c -fPIC -o ../common/chain.lo ../common/chain.c  -I../common -I../tracker -I/usr/local/include
cc -Wall -O -D_FILE_OFFSET_BITS=64 -g -DDEBUG_FLAG -DOS_LINUX -c -fPIC -o ../common/shared_func.lo ../common/shared_func.c  -I../common -I../tracker -I/usr/local/include
cc -Wall -O -D_FILE_OFFSET_BITS=64 -g -DDEBUG_FLAG -DOS_LINUX -c -fPIC -o ../common/ini_file_reader.lo ../common/ini_file_reader.c  -I../common -I../tracker -I/usr/local/include
cc -Wall -O -D_FILE_OFFSET_BITS=64 -g -DDEBUG_FLAG -DOS_LINUX -c -fPIC -o ../common/logger.lo ../common/logger.c  -I../common -I../tracker -I/usr/local/include
cc -Wall -O -D_FILE_OFFSET_BITS=64 -g -DDEBUG_FLAG -DOS_LINUX -c -fPIC -o ../common/sockopt.lo ../common/sockopt.c  -I../common -I../tracker -I/usr/local/include
cc -Wall -O -D_FILE_OFFSET_BITS=64 -g -DDEBUG_FLAG -DOS_LINUX -c -fPIC -o ../common/base64.lo ../common/base64.c  -I../common -I../tracker -I/usr/local/include
cc -Wall -O -D_FILE_OFFSET_BITS=64 -g -DDEBUG_FLAG -DOS_LINUX -c -fPIC -o ../common/sched_thread.lo ../common/sched_thread.c  -I../common -I../tracker -I/usr/local/include
cc -Wall -O -D_FILE_OFFSET_BITS=64 -g -DDEBUG_FLAG -DOS_LINUX -c -fPIC -o ../common/http_func.lo ../common/http_func.c  -I../common -I../tracker -I/usr/local/include
cc -Wall -O -D_FILE_OFFSET_BITS=64 -g -DDEBUG_FLAG -DOS_LINUX -c -fPIC -o ../common/md5.lo ../common/md5.c  -I../common -I../tracker -I/usr/local/include
cc -Wall -O -D_FILE_OFFSET_BITS=64 -g -DDEBUG_FLAG -DOS_LINUX -c -fPIC -o ../common/pthread_func.lo ../common/pthread_func.c  -I../common -I../tracker -I/usr/local/include
cc -Wall -O -D_FILE_OFFSET_BITS=64 -g -DDEBUG_FLAG -DOS_LINUX -c -fPIC -o ../common/local_ip_func.lo ../common/local_ip_func.c  -I../common -I../tracker -I/usr/local/include
cc -Wall -O -D_FILE_OFFSET_BITS=64 -g -DDEBUG_FLAG -DOS_LINUX -c -fPIC -o ../common/fdfs_global.lo ../common/fdfs_global.c  -I../common -I../tracker -I/usr/local/include
cc -Wall -O -D_FILE_OFFSET_BITS=64 -g -DDEBUG_FLAG -DOS_LINUX -c -fPIC -o ../common/fdfs_http_shared.lo ../common/fdfs_http_shared.c  -I../common -I../tracker -I/usr/local/include
cc -Wall -O -D_FILE_OFFSET_BITS=64 -g -DDEBUG_FLAG -DOS_LINUX -c -fPIC -o ../common/mime_file_parser.lo ../common/mime_file_parser.c  -I../common -I../tracker -I/usr/local/include
cc -Wall -O -D_FILE_OFFSET_BITS=64 -g -DDEBUG_FLAG -DOS_LINUX -c -fPIC -o ../tracker/tracker_proto.lo ../tracker/tracker_proto.c  -I../common -I../tracker -I/usr/local/include
cc -Wall -O -D_FILE_OFFSET_BITS=64 -g -DDEBUG_FLAG -DOS_LINUX -c -fPIC -o tracker_client.lo tracker_client.c  -I../common -I../tracker -I/usr/local/include
cc -Wall -O -D_FILE_OFFSET_BITS=64 -g -DDEBUG_FLAG -DOS_LINUX -c -fPIC -o client_func.lo client_func.c  -I../common -I../tracker -I/usr/local/include
cc -Wall -O -D_FILE_OFFSET_BITS=64 -g -DDEBUG_FLAG -DOS_LINUX -c -fPIC -o client_global.lo client_global.c  -I../common -I../tracker -I/usr/local/include
cc -Wall -O -D_FILE_OFFSET_BITS=64 -g -DDEBUG_FLAG -DOS_LINUX -c -fPIC -o storage_client.lo storage_client.c  -I../common -I../tracker -I/usr/local/include
cc -Wall -O -D_FILE_OFFSET_BITS=64 -g -DDEBUG_FLAG -DOS_LINUX -o fdfs_monitor fdfs_monitor.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/http_func.o ../common/mime_file_parser.o ../common/fdfs_http_shared.o ../common/md5.o ../common/pthread_func.o ../common/local_ip_func.o ../tracker/tracker_proto.o tracker_client.o client_func.o client_global.o storage_client.o -L/usr/local/lib  -ldl -rdynamic -I../common -I../tracker -I/usr/local/include
../common/sched_thread.o: In function `sched_start':
/data/soft/FastDFS/tracker/../common/sched_thread.c:240: undefined reference to `pthread_create'
../common/pthread_func.o: In function `init_pthread_lock':
/data/soft/FastDFS/tracker/../common/pthread_func.c:32: undefined reference to `pthread_mutexattr_init'
/data/soft/FastDFS/tracker/../common/pthread_func.c:40: undefined reference to `pthread_mutexattr_settype'
/data/soft/FastDFS/tracker/../common/pthread_func.c:57: undefined reference to `pthread_mutexattr_destroy'
../common/pthread_func.o: In function `init_pthread_attr':
/data/soft/FastDFS/tracker/../common/pthread_func.c:84: undefined reference to `pthread_attr_getstacksize'
/data/soft/FastDFS/tracker/../common/pthread_func.c:115: undefined reference to `pthread_attr_setstacksize'
../common/pthread_func.o: In function `create_work_threads':
/data/soft/FastDFS/tracker/../common/pthread_func.c:156: undefined reference to `pthread_create'
../common/pthread_func.o: In function `kill_work_threads':
/data/soft/FastDFS/tracker/../common/pthread_func.c:182: undefined reference to `pthread_kill'
collect2: ld returned 1 exit status
make: *** [fdfs_monitor] Error 1
root@snsfile35:/data/soft/FastDFS#

论坛徽章:
4
2015年辞旧岁徽章
日期:2015-03-03 16:54:152015年迎新春徽章
日期:2015-03-04 09:56:11IT运维版块每日发帖之星
日期:2016-08-11 06:20:00IT运维版块每日发帖之星
日期:2016-08-15 06:20:00
发表于 2011-05-27 15:52 |显示全部楼层
回复 1# wbteve

缺少pthread库。

论坛徽章:
0
发表于 2011-11-19 16:19 |显示全部楼层
这个问题其实不是缺少pthread库,参看以下帖子:

http://ubuntuforums.org/showthread.php?p=11400708

论坛徽章:
0
发表于 2011-12-01 14:35 |显示全部楼层
回复 1# wbteve

make.sh中找到这句:
    if [ -f /usr/lib/libpthread.so ] || [ -f /usr/local/lib/libpthread.so ] || [ -f /usr/lib64/libpthread.so ] || [ -f /usr/lib/libpthread.a ] || [ -f /usr/local/lib/libpthread.a ] || [ -f /usr/lib64/libpthread.a ]; then
  LIBS="$LIBS -lpthread"

是因为这里面的libpthread.so这个库路径不对,我也遇到过这个问题,把正确的路径加进来就可以了。

论坛徽章:
4
2015年辞旧岁徽章
日期:2015-03-03 16:54:152015年迎新春徽章
日期:2015-03-04 09:56:11IT运维版块每日发帖之星
日期:2016-08-11 06:20:00IT运维版块每日发帖之星
日期:2016-08-15 06:20:00
发表于 2011-12-01 14:53 |显示全部楼层
回复 4# wwww6662003

挺好,顶!

论坛徽章:
0
发表于 2011-12-01 15:36 |显示全部楼层
回复 5# happy_fish100


   向 happy_fish100 老师学习!

论坛徽章:
0
发表于 2011-12-06 20:03 |显示全部楼层
快速解决办法:

第一步安装这个 sudo apt-get install  libpthread-workqueue-dev
第二步做个链接 sudo ln -s /usr/lib/libpthread-workqueue.so /usr/lib/libpthread.so

打完收工~~~~

论坛徽章:
0
发表于 2011-12-22 19:57 |显示全部楼层
楼主你好,这两天我也尝试在ubuntu 11.10 64bit上安装FastDFS,关于pthread的问题我已经按照你们上面写的方法解决了,但还有很多问题无法解决,能否留个qq什么的联系方式,求指导啊,非常感谢。

论坛徽章:
4
2015年辞旧岁徽章
日期:2015-03-03 16:54:152015年迎新春徽章
日期:2015-03-04 09:56:11IT运维版块每日发帖之星
日期:2016-08-11 06:20:00IT运维版块每日发帖之星
日期:2016-08-15 06:20:00
发表于 2011-12-22 20:23 |显示全部楼层
本帖最后由 happy_fish100 于 2012-03-08 16:51 编辑
higvvv 发表于 2011-12-22 19:57
楼主你好,这两天我也尝试在ubuntu 11.10 64bit上安装FastDFS,关于pthread的问题我已经按照你们上面写的方 ...


加入FastDFS技术交流群吧,群号:212801927

论坛徽章:
0
发表于 2011-12-22 20:36 |显示全部楼层
谢谢fish哥
您需要登录后才可以回帖 登录 | 注册

本版积分规则 发表回复

  

北京盛拓优讯信息技术有限公司. 版权所有 京ICP备16024965号-6 北京市公安局海淀分局网监中心备案编号:11010802020122 niuxiaotong@pcpop.com 17352615567
未成年举报专区
中国互联网协会会员  联系我们:huangweiwei@itpub.net
感谢所有关心和支持过ChinaUnix的朋友们 转载本站内容请注明原作者名及出处

清除 Cookies - ChinaUnix - Archiver - WAP - TOP