免费注册 查看新帖 |

Chinaunix

  平台 论坛 博客 文库
最近访问板块 发新帖
查看: 6340 | 回复: 0
打印 上一主题 下一主题

[FastDFS] 安装ngx_http_fastdfs_module错误 [复制链接]

论坛徽章:
0
跳转到指定楼层
1 [收藏(0)] [报告]
发表于 2015-03-04 10:23 |只看该作者 |倒序浏览
错误类容类似如下
/tmp/fastdfs-nginx-module/src/common.c:21:25: error: fdfs_define.h: No such file or directory
/tmp/fastdfs-nginx-module/src/common.c:24:25: error: fdfs_global.h: No such file or directory
/tmp/fastdfs-nginx-module/src/common.c:27:30: error: fdfs_http_shared.h: No such file or directory
/tmp/fastdfs-nginx-module/src/common.c:28:25: error: fdfs_client.h: No such file or directory
/tmp/fastdfs-nginx-module/src/common.c:30:30: error: fdfs_shared_func.h: No such file or directory
/tmp/fastdfs-nginx-module/src/common.c:31:26: error: trunk_shared.h: No such file or directory
根据字面意思是没有找到相关的文件

解决如下:
打开src 下的config 可以看到如下信息
ngx_addon_name=ngx_http_fastdfs_module
HTTP_MODULES="$HTTP_MODULES ngx_http_fastdfs_module"
NGX_ADDON_SRCS="$NGX_ADDON_SRCS $ngx_addon_dir/ngx_http_fastdfs_module.c"
CORE_INCS="$CORE_INCS /usr/local/include/fastdfs /usr/local/include/fastcommon/"
CORE_LIBS="$CORE_LIBS -L/usr/local/lib -lfastcommon -lfdfsclient"
CFLAGS="$CFLAGS -D_FILE_OFFSET_BITS=64 -DFDFS_OUTPUT_CHUNK_SIZE='256*1024' -DFDFS_MOD_CONF_FILENAME='\"/etc/fdfs/mod_fastdfs.conf\"'"

其中CORE_INCS="$CORE_INCS /usr/local/include/fastdfs /usr/local/include/fastcommon/" 明确指定需要的fastdfs文件路径

所以,就需要找出所安装的fastdfs文件路径。
在我安装的5.05版本中,默认prefix安装路径为/usr(可以从FastDFS下的make.sh中找到),是以需要删除多余的/local路径

更改后的CORE_INCS="$CORE_INCS /usr/include/fastdfs /usr/include/fastcommon/",再次编译的时候,就可以解决问题。



您需要登录后才可以回帖 登录 | 注册

本版积分规则 发表回复

  

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

清除 Cookies - ChinaUnix - Archiver - WAP - TOP