免费注册 查看新帖 |

Chinaunix

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

[FastDFS] 安装nginx1.6.2 报错,求问如何解决 [复制链接]

论坛徽章:
2
2015年辞旧岁徽章
日期:2015-03-03 16:54:152015年迎新春徽章
日期:2015-03-04 09:57:09
跳转到指定楼层
1 [收藏(0)] [报告]
发表于 2015-02-12 19:35 |只看该作者 |倒序浏览
的nginx版本是1.6.2 fastdfs v5.05  fastdfs-nginx-module v1.16 ,fastdfs部署好了,上传一个文件测试成功,开始安装nginx,如下执行:
1.执行
./configure \
> --prefix=/home/nginx/nginx-1.6.2 \
> --sbin-path=/home/nginx/nginx-1.6.2/nginx \
> --conf-path=/home/nginx/nginx-1.6.2/nginx.conf \
> --pid-path=/home/nginx/nginx-1.6.2/nginx.pid \
> --with-http_ssl_module \
> --with-openssl=/root/Downloads/openssl-1.0.2 \
> --add-module=/home/nginx/fastdfs-nginx-module/src
结果:
checking for OS
+ Linux 2.6.34-12-desktop x86_64
checking for C compiler ... found
+ using GNU C compiler
+ gcc version: 4.5.0 20100604 [gcc-4_5-branch revision 160292] (SUSE Linux)
checking for gcc -pipe switch ... found
checking for gcc builtin atomic operations ... found
checking for C99 variadic macros ... found
checking for gcc variadic macros ... found
checking for unistd.h ... found
checking for inttypes.h ... found
checking for limits.h ... found
checking for sys/filio.h ... not found
checking for sys/param.h ... found
checking for sys/mount.h ... found
checking for sys/statvfs.h ... found
checking for crypt.h ... found
checking for Linux specific features
checking for epoll ... found
checking for EPOLLRDHUP ... found
checking for O_PATH ... not found
checking for sendfile() ... found
checking for sendfile64() ... found
checking for sys/prctl.h ... found
checking for prctl(PR_SET_DUMPABLE) ... found
checking for sched_setaffinity() ... found
checking for crypt_r() ... found
checking for sys/vfs.h ... found
checking for nobody group ... found
checking for poll() ... found
checking for /dev/poll ... not found
checking for kqueue ... not found
checking for crypt() ... not found
checking for crypt() in libcrypt ... found
checking for F_READAHEAD ... not found
checking for posix_fadvise() ... found
checking for O_DIRECT ... found
checking for F_NOCACHE ... not found
checking for directio() ... not found
checking for statfs() ... found
checking for statvfs() ... found
checking for dlopen() ... not found
checking for dlopen() in libdl ... found
checking for sched_yield() ... found
checking for SO_SETFIB ... not found
checking for SO_ACCEPTFILTER ... not found
checking for TCP_DEFER_ACCEPT ... found
checking for TCP_KEEPIDLE ... found
checking for TCP_FASTOPEN ... not found
checking for TCP_INFO ... found
checking for accept4() ... found
checking for int size ... 4 bytes
checking for long size ... 8 bytes
checking for long long size ... 8 bytes
checking for void * size ... 8 bytes
checking for uint64_t ... found
checking for sig_atomic_t ... found
checking for sig_atomic_t size ... 4 bytes
checking for socklen_t ... found
checking for in_addr_t ... found
checking for in_port_t ... found
checking for rlim_t ... found
checking for uintptr_t ... uintptr_t found
checking for system byte ordering ... little endian
checking for size_t size ... 8 bytes
checking for off_t size ... 8 bytes
checking for time_t size ... 8 bytes
checking for setproctitle() ... not found
checking for pread() ... found
checking for pwrite() ... found
checking for sys_nerr ... found
checking for localtime_r() ... found
checking for posix_memalign() ... found
checking for memalign() ... found
checking for mmap(MAP_ANON|MAP_SHARED) ... found
checking for mmap("/dev/zero", MAP_SHARED) ... found
checking for System V shared memory ... found
checking for POSIX semaphores ... not found
checking for POSIX semaphores in libpthread ... found
checking for struct msghdr.msg_control ... found
checking for ioctl(FIONBIO) ... found
checking for struct tm.tm_gmtoff ... found
checking for struct dirent.d_namlen ... not found
checking for struct dirent.d_type ... found
checking for sysconf(_SC_NPROCESSORS_ONLN) ... found
checking for openat(), fstatat() ... found
checking for getaddrinfo() ... found
configuring additional modules
adding module in /home/nginx/fastdfs-nginx-module/src
+ ngx_http_fastdfs_module was configured
checking for PCRE library ... found
checking for PCRE JIT support ... found
checking for zlib library ... found
creating objs/Makefile

Configuration summary
  + using system PCRE library
  + using OpenSSL library: /root/Downloads/openssl-1.0.2
  + md5: using OpenSSL library
  + sha1: using OpenSSL library
  + using system zlib library

  nginx path prefix: "/home/nginx/nginx-1.6.2"
  nginx binary file: "/home/nginx/nginx-1.6.2/nginx"
  nginx configuration prefix: "/home/nginx/nginx-1.6.2"
  nginx configuration file: "/home/nginx/nginx-1.6.2/nginx.conf"
  nginx pid file: "/home/nginx/nginx-1.6.2/nginx.pid"
  nginx error log file: "/home/nginx/nginx-1.6.2/logs/error.log"
  nginx http access log file: "/home/nginx/nginx-1.6.2/logs/access.log"
  nginx http client request body temporary files: "client_body_temp"
  nginx http proxy temporary files: "proxy_temp"
  nginx http fastcgi temporary files: "fastcgi_temp"
  nginx http uwsgi temporary files: "uwsgi_temp"
  nginx http scgi temporary files: "scgi_temp"

2、执行make
-lpthread -lcrypt -L/usr/local/lib -lfastcommon -lfdfsclient -lpcre /root/Downloads/openssl-1.0.2/libssl.a /root/Downloads/openssl-1.0.2/libcrypto.a -ldl -lz
objs/addon/src/ngx_http_fastdfs_module.o: In function `fdfs_mod_init':
/home/nginx/fastdfs-nginx-module/src/common.c:149: undefined reference to `trunk_shared_init'
objs/addon/src/ngx_http_fastdfs_module.o: In function `fdfs_load_groups_store_paths':
/home/nginx/fastdfs-nginx-module/src/common.c:124: undefined reference to `storage_load_paths_from_conf_file_ex'
objs/addon/src/ngx_http_fastdfs_module.o: In function `fdfs_mod_init':
/home/nginx/fastdfs-nginx-module/src/common.c:216: undefined reference to `storage_load_paths_from_conf_file'
/home/nginx/fastdfs-nginx-module/src/common.c:226: undefined reference to `g_fdfs_connect_timeout'
/home/nginx/fastdfs-nginx-module/src/common.c:233: undefined reference to `g_fdfs_network_timeout'
/home/nginx/fastdfs-nginx-module/src/common.c:250: undefined reference to `fdfs_http_params_load'
/home/nginx/fastdfs-nginx-module/src/common.c:281: undefined reference to `g_tracker_group'
/home/nginx/fastdfs-nginx-module/src/common.c:281: undefined reference to `fdfs_load_tracker_group_ex'
/home/nginx/fastdfs-nginx-module/src/common.c:293: undefined reference to `fdfs_load_storage_ids_from_file'
objs/addon/src/ngx_http_fastdfs_module.o: In function `fdfs_get_params_from_tracker':
/home/nginx/fastdfs-nginx-module/src/common.c:1276: undefined reference to `g_tracker_group'
/home/nginx/fastdfs-nginx-module/src/common.c:1276: undefined reference to `fdfs_get_ini_context_from_tracker'
/home/nginx/fastdfs-nginx-module/src/common.c:1292: undefined reference to `g_tracker_group'
/home/nginx/fastdfs-nginx-module/src/common.c:1292: undefined reference to `fdfs_get_storage_ids_from_tracker_group'
objs/addon/src/ngx_http_fastdfs_module.o: In function `fdfs_mod_init':
/home/nginx/fastdfs-nginx-module/src/common.c:336: undefined reference to `g_fdfs_store_paths'
/home/nginx/fastdfs-nginx-module/src/common.c:339: undefined reference to `g_fdfs_store_paths'
/home/nginx/fastdfs-nginx-module/src/common.c:341: undefined reference to `g_fdfs_store_paths'
/home/nginx/fastdfs-nginx-module/src/common.c:339: undefined reference to `g_fdfs_store_paths'
/home/nginx/fastdfs-nginx-module/src/common.c:347: undefined reference to `g_storage_id_count'
/home/nginx/fastdfs-nginx-module/src/common.c:347: undefined reference to `g_tracker_group'
/home/nginx/fastdfs-nginx-module/src/common.c:347: undefined reference to `g_fdfs_network_timeout'
/home/nginx/fastdfs-nginx-module/src/common.c:347: undefined reference to `g_fdfs_connect_timeout'
/home/nginx/fastdfs-nginx-module/src/common.c:347: undefined reference to `g_fdfs_base_path'
objs/addon/src/ngx_http_fastdfs_module.o: In function `fdfs_http_request_handler':
/home/nginx/fastdfs-nginx-module/src/common.c:647: undefined reference to `g_fdfs_store_paths'
/home/nginx/fastdfs-nginx-module/src/common.c:647: undefined reference to `g_fdfs_store_paths'
/home/nginx/fastdfs-nginx-module/src/common.c:647: undefined reference to `g_fdfs_store_paths'
/home/nginx/fastdfs-nginx-module/src/common.c:680: undefined reference to `g_fdfs_store_paths'
/home/nginx/fastdfs-nginx-module/src/common.c:703: undefined reference to `fdfs_http_get_parameter'
/home/nginx/fastdfs-nginx-module/src/common.c:704: undefined reference to `fdfs_http_get_parameter'
/home/nginx/fastdfs-nginx-module/src/common.c:715: undefined reference to `fdfs_http_check_token'
/home/nginx/fastdfs-nginx-module/src/common.c:750: undefined reference to `storage_split_filename_no_check'
/home/nginx/fastdfs-nginx-module/src/common.c:772: undefined reference to `fdfs_check_data_filename'
/home/nginx/fastdfs-nginx-module/src/common.c:778: undefined reference to `fdfs_get_file_info_ex1'
/home/nginx/fastdfs-nginx-module/src/common.c:804: undefined reference to `trunk_file_stat_func_ex'
/home/nginx/fastdfs-nginx-module/src/common.c:821: undefined reference to `fdfs_http_get_parameter'
/home/nginx/fastdfs-nginx-module/src/common.c:821: undefined reference to `fdfs_http_get_parameter'
/home/nginx/fastdfs-nginx-module/src/common.c:886: undefined reference to `fdfs_http_get_parameter'
/home/nginx/fastdfs-nginx-module/src/common.c:969: undefined reference to `fdfs_http_get_file_extension'
/home/nginx/fastdfs-nginx-module/src/common.c:999: undefined reference to `fdfs_get_file_info_ex1'
/home/nginx/fastdfs-nginx-module/src/common.c:1047: undefined reference to `fdfs_http_get_parameter'
/home/nginx/fastdfs-nginx-module/src/common.c:1058: undefined reference to `fdfs_http_get_parameter'
/home/nginx/fastdfs-nginx-module/src/common.c:1120: undefined reference to `storage_download_file_ex1'
/home/nginx/fastdfs-nginx-module/src/common.c:1149: undefined reference to `trunk_get_full_filename_ex'
/home/nginx/fastdfs-nginx-module/src/common.c:821: undefined reference to `fdfs_http_get_parameter'
/home/nginx/fastdfs-nginx-module/src/common.c:969: undefined reference to `fdfs_http_get_file_extension'
/home/nginx/fastdfs-nginx-module/src/common.c:969: undefined reference to `fdfs_http_get_file_extension'
collect2: ld returned 1 exit status
make[1]: *** [objs/nginx] Error 1
make[1]: Leaving directory `/home/nginx/nginx-1.6.2'
make: *** [build] Error 2
请问如果解决该问题,第一次搞这玩意,被这个问题搞死了,希望大家多多指点。

论坛徽章:
2
2015年迎新春徽章
日期:2015-03-04 10:16:532015年亚洲杯之伊拉克
日期:2015-03-09 13:57:11
2 [报告]
发表于 2015-02-13 09:42 |只看该作者
回复 1# xxxdad


cd fastdfs-nginx-module/src

vi config,原来是: CORE_INCS="$CORE_INCS /usr/local/include/fastdfs /usr/local/include/fastcommon/"

改成:CORE_INCS="$CORE_INCS /usr/include/fastdfs /usr/include/fastcommon/"

你可以自己查看在 /usr/local/include/路径下是否有fastdfs

论坛徽章:
2
2015年辞旧岁徽章
日期:2015-03-03 16:54:152015年迎新春徽章
日期:2015-03-04 09:57:09
3 [报告]
发表于 2015-02-13 10:00 |只看该作者
回复 2# FILERF

已经修改成:CORE_INCS="$CORE_INCS /usr/include/fastdfs /usr/include/fastcommon/"
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/include/fastdfs /usr/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\"'"
#################################

并确认过/usr/include/fastdfs和 /usr/include/fastcommon/这两个目录中有文件:
#################################
linux-bxew:/usr/include/fastcommon # ls
_os_bits.h         fast_mblock.h      ioevent.h        pthread_func.h
avl_tree.h         fast_task_queue.h  ioevent_loop.h   sched_thread.h
base64.h           fast_timer.h       local_ip_func.h  shared_func.h
chain.h            hash.h             logger.h         sockopt.h
common_define.h    http_func.h        md5.h
connection_pool.h  ini_file_reader.h  process_ctrl.h
linux-bxew:/usr/include/fastcommon # cd /usr/local/include
linux-bxew:/usr/local/include # ls
pcre.h          pcre_stringpiece.h  pcrecpparg.h  zconf.h
pcre_scanner.h  pcrecpp.h           pcreposix.h   zlib.h
#################################


---但/usr/local/include/路径下没有fastdfs,请问如何解决。

论坛徽章:
2
2015年迎新春徽章
日期:2015-03-04 10:16:532015年亚洲杯之伊拉克
日期:2015-03-09 13:57:11
4 [报告]
发表于 2015-02-13 10:26 |只看该作者
回复 3# xxxdad


    ---但/usr/local/include/路径下没有fastdfs,请问如何解决。

那你看看/usr/include/路径下没有fastdfs,如果有,将配置文件改为CORE_INCS="$CORE_INCS /usr/include/fastdfs /usr/include/fastcommon" 再次重新编译运行就可以了

论坛徽章:
2
2015年辞旧岁徽章
日期:2015-03-03 16:54:152015年迎新春徽章
日期:2015-03-04 09:57:09
5 [报告]
发表于 2015-02-13 10:38 |只看该作者
回复 4# FILERF


    配置文件已经修改为CORE_INCS="$CORE_INCS /usr/include/fastdfs /usr/include/fastcommon"了,还是不行,是不是版本的兼容的问题引起的啊?

论坛徽章:
2
2015年迎新春徽章
日期:2015-03-04 10:16:532015年亚洲杯之伊拉克
日期:2015-03-09 13:57:11
6 [报告]
发表于 2015-02-13 11:02 |只看该作者
回复 5# xxxdad


    不清楚,这个问题我也是昨天解决的 。

我安装的版本如下:

FastDFS_v5.05.tar.gz ,fastdfs-nginx-module_v1.15.tar.gz,libfastcommon-master.zip,nginx-1.4.7.tar.gz

1.安装前先安装这些东西:
yum -y install gcc

yum -y install gcc-c++

yum -y install zlib-devel

yum -y install pcre-devel

yum -y install openssl openssl-devel

-------------------
我是统一将这些压缩包放在/usr/local目录下解压后顺序安装:libfastcommon-master   执行 ./make.sh   ./make.sh install

FastDFS  执行 ./make.sh   ./make.sh install

nginx-1.4.7  执行./configure --prefix=/usr/local/nginx --add-module=../fastdfs-nginx-module/src,这个执行完后执行 make && make install ,会提示安装失败,原因

是FastDFS安装成功后,/usr/local/include/路径下没有fastdfs,而是在/usr/include/路径下,所以这里修改之前说的配置文件的路径后再次执行:

./configure --prefix=/usr/local/nginx --add-module=../fastdfs-nginx-module/src     make && make install

就安装完成了






论坛徽章:
2
2015年迎新春徽章
日期:2015-03-04 10:16:532015年亚洲杯之伊拉克
日期:2015-03-09 13:57:11
7 [报告]
发表于 2015-02-13 11:09 |只看该作者
回复 5# xxxdad


   

FastDFS_v5.05.tar.gz

337.3 KB, 下载次数: 86

fastdfs-nginx-module_v1.15.tar.gz

16.86 KB, 下载次数: 86

libfastcommon-master.zip

99.71 KB, 下载次数: 76

nginx-1.4.7.tar.gz

751.13 KB, 下载次数: 77

论坛徽章:
2
2015年辞旧岁徽章
日期:2015-03-03 16:54:152015年迎新春徽章
日期:2015-03-04 09:57:09
8 [报告]
发表于 2015-02-13 12:51 |只看该作者
回复 7# FILERF


    谢谢,我试试
您需要登录后才可以回帖 登录 | 注册

本版积分规则 发表回复

  

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

清除 Cookies - ChinaUnix - Archiver - WAP - TOP