Formal Environment:
System: Red Hat Enterprise Linux Server release 5.6 (Tikanga)
Kernel: 2.6.18-238.31.1.el5
Number of positions: 64
Test environment:
System: CentOS release 5.8 (Final)
Kernel: 2.6.18-53.el5
Number of positions: 32
Related software versions and
1.apr:http://labs.mop.com/apache-mirror//apr/apr-1.4.6.tar.gz
2.apr-util:http://labs.mop.com/apache-mirror//apr/apr-util-1.4.1.tar.gz
3.pcre:http://cdnetworks-kr-2.dl.sourceforge.net/project/pcre/pcre/8.30/pcre-8.30.zip
4.openssl:http://www.openssl.org/source/openssl-1.0.1c.tar.gz
5.apache:http://labs.mop.com/apache-mirror/httpd/httpd-2.4.2.tar.gz
(Apr,apr-util,pcre installed in this skip)
Test environment OpenSSL and Apache installation methods:
OpenSSL compilation:
./config; Make Make install
Apache compilation:
./configure--prefix=/opt/xyz/apache2.4.2_resin4.0.29/apache2--enable-mods-shared=all--enable-so--with-apr=/usr /local/apr-with-apr-util=/usr/local/apr-util--with-pcre=/usr/local/pcre--enable-ssl--with-ssl=/usr/local/ssl
Formal environment OpenSSL and Apache installation methods:
OpenSSL compilation:
If you compile according to the test environment, the following error (Google came out of the basic meaning of the result is a bug, in this way, despise Baidu, even a similar search did not.) )
/USR/BIN/LD:/usr/local/ssl/lib/libssl.a (S3_SRVR.O): Relocation r_x86_64_32 against ' a local symbol ' can not is used when Making a shared object; Recompile with-fpic
/usr/local/ssl/lib/libssl.a:could not read Symbols:bad Valuecollect2:ld returned 1 exit statusmake[4]: * * * [mod_ssl.la] Error 1make[4]: Leaving directory '/opt/xyz/httpd-2.4.2/modules/ssl ' make[3]: * * * [shared-build-recursive] Error 1make[ 3]: Leaving directory '/opt/xyz/httpd-2.4.2/modules/ssl ' make[2]: * * * [shared-build-recursive] Error 1make[2]: Leaving Directory '/opt/xyz/httpd-2.4.2/modules ' make[1]: * * [shared-build-recursive] Error 1make[1]: Leaving directory '/opt/ xyz/httpd-2.4.2 ' Make: * * * [all-recursive] Error 1
This error indicates an SSL error, requires recompilation, and adds-fpic?. In that case, just follow the request, find the source files of OpenSSL, recompile,./config-fpic,make clean countless times, and finally found that the error is still a hint. This is the pit father, simply all deleted.
Successful solution under 64-bit:
OpenSSL compilation:
./config--prefix=${destination_dir}-fpic no-gost no-shared no-zlib
make depend; Make install
Apache compiles the same way as usual.
Apache "/usr/local/ssl/lib/libssl.a:could not read Symbols:bad value" error solution when loading the OpenSSL module