我尝试从2.4.26升级到Apache 2.4.27。配置,制作& make install all complete,但是当我尝试反弹Apache时,我得到以下内容:
httpd: Syntax error on line 145 of /usr/local/apache2/conf/httpd.conf: Cannot load modules/mod_ssl.so into server: /usr/local/apache2/modules/mod_ssl.so: undefined symbol: SSL_get_srp_userinfo
OpenSSL版本是openssl-1.0.2l,通过运行:
安装./config --prefix=/usr/local/ --openssldir=/usr/local/openssl enable-tlsext shared
make && make install
通过运行:
安装了Apache 2.4.27./configure --enable-modules=all --enable-ssl --with-included-apr --enable-mod-proxy --with-included-apr-util
make && make install
我以前曾多次遇到同样的问题,答案是确保LD_LIBRARY_PATH设置为/usr/local/lib64:/usr/local/lib
但是这次没有帮助。我尝试过配置&用这个集合编译,没有LD_LIBRARY_PATH,也没有帮助。
mod_ssl.so看起来像是针对yum安装的OpenSSL版本编译的:
[root@localhost httpd-2.4.27]# yum list installed |grep -i ssl
openssl.i686 1.0.1e-57.el6 @ol6_latest
openssl.x86_64 1.0.1e-57.el6 @ol6_latest
openssl-devel.x86_64 1.0.1e-57.el6 @ol6_latest
pyOpenSSL.x86_64 0.13.1-2.el6 @ol6_latest
ldd /usr/local/apache2/modules/mod_ssl.so
linux-vdso.so.1 => (0x00007ffd012ba000)
libssl.so.10 => /usr/lib64/libssl.so.10 (0x00007f3258fb7000)
libcrypto.so.10 => /usr/lib64/libcrypto.so.10 (0x00007f3258bd1000)
我尝试过很多不同的选项(这里列出的内容太多了),例如--with-ssl=/usr/local/openssl, --enable-ssl=shared
以及在config.nice中设置LDFLAGS="-L/usr/local/lib64"
,但仍然没有喜悦。
有什么想法吗?
答案 0 :(得分:0)
最后设法通过https://serverfault.com/questions/587267/upgrade-to-apache-2-4-9-opensssl-error-ssl-get-srp-userinfo的评论来解决这个问题。结果设置LDFLAGS就是答案:
LDFLAGS="-L/usr/local/lib64"; export LDFLAGS
"./configure" \
"--enable-so" \
"--with-included-apr" \
"--enable-ssl" \
"--with-ssl=/usr/local/openssl" \
"LDFLAGS=-L/usr/local/lib64" \
"$@"