编译安装nginx的时候
./configure --with-http_ssl_module
报了如下错误
objs/src/event/ngx_event_openssl.o: In function `ngx_ssl_get_ciphers':
/root/nginx-1.12.0/src/event/ngx_event_openssl.c:3358: undefined reference to `SSL_CIPHER_find'
/root/nginx-1.12.0/src/event/ngx_event_openssl.c:3378: undefined reference to `SSL_CIPHER_find'
objs/src/event/ngx_event_openssl.o: In function `ngx_ssl_check_host':
/root/nginx-1.12.0/src/event/ngx_event_openssl.c:3169: undefined reference to `X509_check_host'
objs/src/http/ngx_http_request.o: In function `ngx_http_ssl_handshake_handler':
/root/nginx-1.12.0/src/http/ngx_http_request.c:784: undefined reference to `SSL_get0_alpn_selected'
objs/src/http/modules/ngx_http_ssl_module.o: In function `ngx_http_ssl_merge_srv_conf':
/root/nginx-1.12.0/src/http/modules/ngx_http_ssl_module.c:690: undefined reference to `SSL_CTX_set_alpn_select_cb'
collect2: ld returned 1 exit status
原因是升级openssl编译导致。

在升级nginx并编译时遇到错误'undefined reference to `SSL_CTX_set_alpn_select_cb',原因是openssl版本问题。解决方法包括检查openssl版本和安装路径,修改nginx源码中关于openssl的配置,并在configure前指定openssl路径,成功通过编译。
最低0.47元/天 解锁文章

被折叠的 条评论
为什么被折叠?



