compilation terminated. make[1]: *** [objs/addon/src/ngx_http_fastdfs_module.o] Error 1 make[1]: Lea

在编译执行中发生:

compilation terminated.
make[1]: *** [objs/addon/src/ngx_http_fastdfs_module.o] Error 1
make[1]: Leaving directory `/opt/nginx-1.8.1'
make: *** [build] Error 2

compilation terminated. make[1]: *** [objs/addon/src/ngx_http_fastdfs_module.o] Error 1 make[1]: Lea_第1张图片

解决方法:

编辑 fastdfs-nginx-module-1.20/src/config 文件

vim fastdfs-nginx-module-1.20/src/config

compilation terminated. make[1]: *** [objs/addon/src/ngx_http_fastdfs_module.o] Error 1 make[1]: Lea_第2张图片

附config内容:

ngx_addon_name=ngx_http_fastdfs_module

if test -n "${ngx_module_link}"; then
    ngx_module_type=HTTP
    ngx_module_name=$ngx_addon_name
    ngx_module_incs="/usr/local/include/fastdfs /usr/include/fastcommon/"
    ngx_module_libs="-lfastcommon -lfdfsclient"
    ngx_module_srcs="$ngx_addon_dir/ngx_http_fastdfs_module.c"
    ngx_module_deps=
    CFLAGS="$CFLAGS -D_FILE_OFFSET_BITS=64 -DFDFS_OUTPUT_CHUNK_SIZE='256*1024' -DFDFS_MOD_CONF_FILENAME='\"/etc/fdfs/mod_fastdfs.conf\"'"
    . auto/module
else
    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/include/fastcommon/"
    CORE_LIBS="$CORE_LIBS -lfastcommon -lfdfsclient"
    CFLAGS="$CFLAGS -D_FILE_OFFSET_BITS=64 -DFDFS_OUTPUT_CHUNK_SIZE='256*1024' -DFDFS_MOD_CONF_FILENAME='\"/etc/fdfs/mod_fastdfs.conf\"'"
fi
 ngx_module_incs="/usr/local/include/fastdfs /usr/include/fastcommon/

CORE_INCS="$CORE_INCS /usr/local/include/fastdfs /usr/include/fastcommon/

回到解压后nginx目录下:

compilation terminated. make[1]: *** [objs/addon/src/ngx_http_fastdfs_module.o] Error 1 make[1]: Lea_第3张图片

这样就没有错误啦;

你可能感兴趣的:(compilation terminated. make[1]: *** [objs/addon/src/ngx_http_fastdfs_module.o] Error 1 make[1]: Lea)