- 论坛徽章:
- 0
|
错误类容类似如下
/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/",再次编译的时候,就可以解决问题。
|
|