nginx源码编译报错:OpenSSL library is not used的解决办法

dnf -y install zlib zlib-devel pcre pcre-devel pcre2 pcre2-devel openssl openssl-devel

还是报错的话:
即使装上了openssl-devel,如果./configure时没有带上--with-http_ssl_module,还是会显示OpenSSL library is not used,这样的话就不能listen ssl了,否则会报错:the "ssl" parameter requires ngx_http_ssl_module
所以解决方法是./configure的时候加上--with-http_ssl_module./configure --with-http_ssl_module

然后这一行就变成了:+ using system OpenSSL library

即使系统上安装了openssl-devel,编译后的信息如下:
Configuration summary
  + using system PCRE2 library
  + OpenSSL library is not used
  + using system zlib library

编译时加上参数--with-http_ssl_module,编译后的信息如下:
Configuration summary
  + using system PCRE2 library
  + using system OpenSSL library
  + using system zlib library

posted @ 2025-04-14 15:59  哈喽哈喽111111  阅读(537)  评论(0)    收藏  举报