fastdfs 安装undefined reference to `__sync_add_and_fetch_4'

安装fastdf的时候,出现

 

问题一

undefined reference to `__sync_add_and_fetch_4'

产生原因:

linux为32位版本。

查看方式:getconf LONG_BIT

解决办法:

执行make命令时加参数:make CFLAGS="-march=i686"

 

问题二

 

FastDFS模块是fastdfs-nginx-module_v1.15,FastDFS是FastDFS_v5.01


/usr/local/src/fastdfs-nginx-module/src/ngx_http_fastdfs_module.c:812: 错误:‘fdfs_send_reply_chunk’ 未声明 (在此函数内第一次使用)
/usr/local/src/fastdfs-nginx-module/src/ngx_http_fastdfs_module.c:813: 错误:‘struct fdfs_http_context’ 没有名为 ‘proxy_handler’ 的成员
/usr/local/src/fastdfs-nginx-module/src/ngx_http_fastdfs_module.c:819: 错误:‘struct fdfs_http_context’ 没有名为 ‘if_modified_since’ 的成员
/usr/local/src/fastdfs-nginx-module/src/ngx_http_fastdfs_module.c:822: 错误:‘struct fdfs_http_context’ 没有名为 ‘if_modified_since’ 的成员
/usr/local/src/fastdfs-nginx-module/src/ngx_http_fastdfs_module.c:852: 错误:‘struct fdfs_http_context’ 没有名为 ‘range’ 的成员
/usr/local/src/fastdfs-nginx-module/src/ngx_http_fastdfs_module.c:858: 错误:‘struct fdfs_http_context’ 没有名为 ‘if_range’ 的成员
/usr/local/src/fastdfs-nginx-module/src/ngx_http_fastdfs_module.c:858: 错误:‘true’ 未声明 (在此函数内第一次使用)
make[1]: *** [objs/addon/src/ngx_http_fastdfs_module.o] 错误 1
make[1]: Leaving directory `/usr/local/src/nginx-1.4.7'
make: *** [build] 错误 2

 

cd fastdfs-nginx-module/src
vi config
去掉/local  
CORE_INCS="$CORE_INCS /usr/include/fastdfs /usr/include/fastcommon/"

软连接
ln -s /usr/lib64/libfastcommon.so /usr/local/lib/libfastcommon.so
ln -s /usr/lib64/libfastcommon.so /usr/lib/libfastcommon.so
ln -s /usr/lib64/libfdfsclient.so /usr/local/lib/libfdfsclient.so
ln -s /usr/lib64/libfdfsclient.so /usr/lib/libfdfsclient.so 
重新编译~  祝君好运  nginx1.6.2  ,nginx mod 1.16  fastdfs5.04 亲测

问题三:

fastdfs 上传成功,下载400错误解决办法

摘要: nginx日志报错ERROR - file: ../common/fdfs_global.c, line: 52, the format of filename

解决办法:

vi /etc/fdfs/mod_fastdfs.conf

将

url_have_group_name=false

改为

url_have_group_name=true  

问题四

FDFSHTTPParams’没有名为‘support_multi_range’的成员 从该篇文章中找到

    /usr/local/fastdfs-nginx-module-master/src/ngx_http_fastdfs_module.c  
In file included from /usr/local/fastdfs-nginx-module-master/src/ngx_http_fastdfs_module.c:6:0:  
/usr/local/fastdfs-nginx-module-master/src/common.c: 在函数‘fdfs_http_request_handler’中:  
/usr/local/fastdfs-nginx-module-master/src/common.c:1245:61: 错误:‘FDFSHTTPParams’没有名为‘support_multi_range’的成员  
                 (pContext->range_count > 1 && !g_http_params.support_multi_range))  
                                                             ^  
make[1]: *** [objs/addon/src/ngx_http_fastdfs_module.o] 错误 1  
make[1]: 离开目录“/usr/local/nginx-1.12.0”  
make: *** [build] 错误 2  

整合的时候,fastdfs-nginx-module中的support_multi_range在Version 5.10以下的版本中找不到。

Version 5.11对应的fastdfs-nginx-module的Version 1.20 

Version 5.10对应的fastdfs-nginx-module的Version 1.19

所以我这边fastdfs-nginx-module选择1.20以前的版本:

转载于:https://my.oschina.net/mickelfeng/blog/1186489

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值