src/event/ngx_event_openssl.c: In function ‘ngx_ssl_dhparam’: src/event/ngx_event_openssl.c:954:11: error: dereferencing pointer to incomplete type ‘DH’ {aka ‘struct dh_st’} dh->p = BN_bin2bn(dh1024_p, sizeof(dh1024_p), NULL); ^~ src/event/ngx_event_openssl.c: In function ‘ngx_ssl_connection_error’: src/event/ngx_event_openssl.c:1941:21: error: ‘SSL_R_NO_CIPHERS_PASSED’ undeclared (first use in this function); did you mean ‘SSL_R_NO_CIPHERS_SPECIFIED’? || n == SSL_R_NO_CIPHERS_PASSED /* 182 */ ^~~~~~~~~~~~~~~~~~~~~~~ SSL_R_NO_CIPHERS_SPECIFIED src/event/ngx_event_openssl.c:1941:21: note: each undeclared identifier is reported only once for each function it appears in make[1]: *** [objs/Makefile:816: objs/src/event/ngx_event_openssl.o] Error 1 make[1]: Leaving directory '/root/nginx-1.10.1' make: *** [Makefile:8: build] Error 2
OpenSSL nginx 发生冲突无法安装https模板 重新安装最新OpenSSL
yum -y install openssl openssl-devel
tar -zxvf openssl-1.1.1b.tar.gz cd openssl-1.1.0e/ &&./config shared zlib --prefix=/usr/local/openssl && make && make install #进入目录把openssl编译安装到 /usr/local/openssl 下 ./config -t make depend //是一种makefile的规则,通过扫描仪个目录下的所有CC++ 代码,从而判断出文件之间的依赖关系,如a.cc文件中调用了b.h(如以形势include<b.h>),如果之后a.cc文件被改动,那么只需要重新编译a.cc文件,不需要编译b.h文件。否则所有的文件都需要重新编译。 cd /usr/local ln -s openssl ssl echo "/usr/local/openssl/lib" >>/etc/ld.so.conf ldconfig echo "PATH=$PATH:/usr/local/openssl/bin" >> /etc/profile && source /etc/profile #添加环境变量
./configure --prefix=/usr/local/nginx --with-http_ssl_module --with-openssl=/root/openssl-1.1.1b