Apache "/usr/local/ssl/lib/libssl.a:could not read Symbols:bad value" error solution when loading the OpenSSL module

Source: Internet
Author: User

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

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.