nginx编译openssl版本兼容或排错修复
时间:2023-05-22 05:12:55 点击:187

  在nginx-0.7.59之前,系统自带的openssl版本低于openssl-0.9.8e时编译时报错如下:

  objs/ngx_modules.o -lcrypt -lpcre -lzobjs/src/http/ngx_http_file_cache.o: In function `ngx_http_file_cache_create_key':/EBS/soft-backup/nginx-0.7.58/src/http/ngx_http_file_cache.c:128: undefined reference to `MD5_Init'/EBS/soft-backup/nginx-0.7.58/src/http/ngx_http_file_cache.c:138: undefined reference to `MD5_Update'/EBS/soft-backup/nginx-0.7.58/src/http/ngx_http_file_cache.c:145: undefined reference to `MD5_Final'collect2: ld returned 1 exit statusmake[1]: *** [objs/nginx] Error 1make[1]: Leaving directory `/EBS/soft-backup/nginx-0.7.58'make: *** [build] Error 2the change log:Changes with nginx 0.7.59 25 May 2009 *) Feature: the “proxy_cache_methods“ and “fastcgi_cache_methods“ directives. *) Bugfix: socket leak; the bug had appeared in 0.7.25. Thanks to Maxim Dounin. *) Bugfix: a segmentation fault occurred in worker process, if a request had no body and the $request_body variable was used; the bug had appeared in 0.7.58. *) Bugfix: the SSL modules might not built on Solaris and Linux; the bug had appeared in 0.7.58. *) Bugfix: ngx_http_xslt_filter_module responses were not handled by SSI, charset, and gzip filters. *) Bugfix: a “charset“ directive did not set a charset to ngx_http_gzip_static_module responses.

  以上转载http://blog.chinaunix.net/u/32831/showart_1953211.html

  感谢提供

  --------------------------------------------------------------------------------

  先确定好 openssl 的版本 以及跟nginx的版本匹配,排除一个可能

  这里有最新版本的

  l版本的http://u.xunzai.com/fileview_222768.html

  然后我发现在Makefile 里面,nginx 都是依旧的默认要手动安装,当然不排除linuxtone里面的roin 教的方法,原理就是要搜索 ldconfig 的目录下的libssl.so

  ln -sf openssl/lib/libsslXXXX /usr/lib 手动整理库链接

  知道归知道,但是对于Makefile不熟悉没找出调用的结构体,而如果有需要(就是无法使用ldconfig或者其他原因)就可以手改Makefile 的目录

  ~/soft/openssl-0.9.8l/openssl/include/openssl/ssl.h: objs/Makefile

  cd ~/soft/openssl-0.9.8l

  && $(MAKE) clean

  && ./config

  --prefix=/home/yuan520/soft/nginx-0.7.64/~/soft/openssl-0.9.8l/openssl 这里的路径是错误的,具体按需修改,顺利指向你的openssl目录即可

  no-shared no-threads ---虽然说使用挂了no-shared 理论上会不和其他版本的openssl冲突,但是实际上我试验了却不行,依旧需要处理好版本兼容的问题

  && $(MAKE)

  && $(MAKE) install

展开 ↓

最新游戏更多

最新软件更多

  • 玩家推荐
  • 游戏攻略

峰溢下载站 Copyright(C) 2008- ytdonghua.net All Rights Reserved!

闽ICP备2023006282号-2| 免责声明