Apache2.40+OpenSSL1.0.1i 编译错误解决过程记录。
[root@linuxidc httpd-2.4.10]# uname -a
Linux linuxidc 2.6.32-431.el6.x86_64 #1 SMP Fri Nov 22 03:15:09 UTC 2013 x86_64 x86_64 x86_64 GNU/Linux
[root@linuxidc httpd-2.4.10]# uname -r
2.6.32-431.el6.x86_64
[root@linuxidc httpd-2.4.10]#
64为CentOS 6.5版本, 编译Apache2.40时出错
Apache编译选项:
./configure --prefix=/usr/local/httpd24 \
--sysconfdir=/etc/httpd24 \
--enable-so \
--enable-ssl \
--enable-cgi \
--enable-rewrite \
--with-zlib \
--with-pcre \
--with-apr=/usr/local/apr/ \
--with-apr-util=/usr/local/apr-util/ \
--enable-modules=most \
--enable-mpms-shared=all \
--with-mpm=event \
--with-ssl=/usr/local/openssl-1.0.1i
错误信息:
/usr/bin/ld: /usr/local/openssl-1.0.1i/lib/libcrypto.a(e_gost_err.o): relocation R_X86_64_32 against `.data' can not be used when making a shared object; recompile with -fPIC
/usr/local/openssl-1.0.1i/lib/libcrypto.a: could not read symbols: Bad value
collect2: ld returned 1 exit status
make[4]: *** [mod_ssl.la] Error 1
make[4]: Leaving directory `/usr/local/src/httpd-2.4.10/modules/ssl'
make[3]: *** [shared-build-recursive] Error 1
make[3]: Leaving directory `/usr/local/src/httpd-2.4.10/modules/ssl'
make[2]: *** [shared-build-recursive] Error 1
make[2]: Leaving directory `/usr/local/src/httpd-2.4.10/modules'
make[1]: *** [shared-build-recursive] Error 1
make[1]: Leaving directory `/usr/local/src/httpd-2.4.10'
make: *** [all-recursive] Error 1
让重新编译OpenSSL使用-fPIC, 结果还是一样, 最后参考 http://www.linuxidc.com/Linux/2014-10/107919p2.htm
重新编译OpenSSL解决了:
./config --prefix=/usr/local/openssl-1.0.1i -fPIC no-gost
--------------------------------------分割线 --------------------------------------
Ubuntu 13.04 安装 LAMP\Vsftpd\Webmin\phpMyAdmin 服务及设置 http://www.linuxidc.com/Linux/2013-06/86250.htm
CentOS 5.9下编译安装LAMP(Apache 2.2.44+MySQL 5.6.10+PHP 5.4.12) http://www.linuxidc.com/Linux/2013-03/80333p3.htm
RedHat 5.4下Web服务器架构之源码构建LAMP环境及应用PHPWind http://www.linuxidc.com/Linux/2012-10/72484p2.htm
LAMP源码环境搭建WEB服务器Linux+Apache+MySQL+PHP http://www.linuxidc.com/Linux/2013-05/84882.htm
LAMP+Xcache 环境搭建 http://www.linuxidc.com/Linux/2014-05/101087.htm
Linux下Apache+OpenSSL配置记录 http://www.linuxidc.com/Linux/2014-09/107390.htm
--------------------------------------分割线 --------------------------------------
本文永久更新链接地址:http://www.linuxidc.com/Linux/2014-10/107919.htm
