Operating System: centos6.4 x86_64
Apache version: httpd-2.2.6
OpenSSL version: openssl-1.0.1e
The following error is reported when compiling Apache with source code:
Authorization: In function 'ssl _ init_ctx_protocol ': ssl_engine_init.c: 390: Warning: Assignment discards qualifiers from pointer target audience: 396: Warning: Assignment discards qualifiers from pointer target audience: in function 'ssl _ init_ctx_verify ': ssl_engine_init.c: 546: Error: 'stack' undeclared (first use in this function) restart: 546: Error: (each undeclared identifier is reported only accept: 546: Error: for each function it appears in .) failed: 546: Error: Expected expression before ') 'failed: In function 'ssl _ init_findcalist': ssl_engine_init.c: 1126: Warning: pointer type mismatch in conditional expressionmake [4]: * [ssl_engine_init.slo] Error 1 make [4]: Leaving directory '/software/httpd-2.2.6/modules/SSL' make [3]: * [Shared-Build-recursive] Error 1 make [3]: Leaving directory '/software/httpd-2.2.6/modules/SSL' make [2]: * [Shared-Build-recursive] Error 1 make [2]: Leaving directory '/software/httpd-2.2.6/modules' make [1]: * [Shared-Build-recursive] Error 1 make [1]: Leaving directory '/software/httpd-2.2.6' Make: *** [All-recursive] Error 1
Cause Analysis: caused by incompatibility between apache2.x and openssl1.0.x
Solution: Install openssl0.9.8e
Installation steps:
# tar zxvf openssl-0.9.8e.tar.gz# cd openssl-0.9.8e# ./config shared zlib# make # make test# make install# mv /usr/bin/openssl /usr/bin/openssl.OFF# mv /usr/include/openssl /usr/include/openssl.OFF# rm -rf /usr/lib/libssl.so# ln -s /usr/local/ssl/bin/openssl /usr/bin/openssl# ln -s /usr/local/ssl/include/openssl /usr/include/openssl# ln -sv /usr/local/ssl/lib/libssl.so.0.9.8 /usr/lib/libssl.so
Configure the library file search path
# echo "/usr/local/ssl/lib" >> /etc/ld.so.conf# ldconfig -v
Check installation result
# openssl version
OpenSSL 0.9.8e 23 Feb 2007
Installed successfully!
Recompile Apache and add -- enable-SSL -- With-SSL =/usr/local/SSL
Solve the problem.
This article is from the "Bing Lincheng" blog, please be sure to keep this source http://308107405.blog.51cto.com/6396647/1537541