您的位置:首页 > 运维架构 > Apache

apache2.40 openssl1.0.1i 编译错误

2014-10-11 11:40 429 查看
[root@diguojin httpd-2.4.10]# uname -a
Linux diguojin 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@diguojin httpd-2.4.10]# uname -r
2.6.32-431.el6.x86_64
[root@diguojin 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://qing.blog.sina.com.cn/1153369603/44bf0603330023r5.html
重新编译OpenSSL解决了:
./config --prefix=/usr/local/openssl-1.0.1i -fPIC no-gost


本文出自 “帝国金菜园子” 博客,请务必保留此出处http://diguojin.blog.51cto.com/5034509/1562460
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: 
相关文章推荐