编译apache报错:httpd-2.4.4/support/ab.c:2271: undefined reference to `TLSv1_1_client_method'解决方法

昨天在Red hat 64上编译编译Apache时,报错:

  httpd-2.4.4/support/ab.c:2271: undefined reference to `TLSv1_1_client_method'

 

在网上找到好久的资料,都不怎么明确方案,大致有些线索是 openssl出错了。

回想可能是刚刚安装的 openssl-1.0.1c.tar.gz,另一台机子在没有安装openssl-1.0.1c.tar.gz之前是可以编译成成功的。

应当是openssl的版本问题,Red hat的本身自带的ssl版本是可以编译通过的,试着重新编译安装openssl-1.0.0k.tar.gz之后再次编译Apache成功:

openssl-1.0.0k.tar.gz 下载地址:openssl-1.0.0k.tar.gz

tar -zxf openssl-1.0.0k.tar.gz
cd openssl-1.0.0k/
./config linux-generic64 
./config --prefix=/usr/local --openssldir=/usr/local/ssl
make && make install
./config shared --prefix=/usr/local --openssldir=/usr/local/ssl
make clean
make && make install

 

 

Apache编译安装:

/configure --prefix=/usr/local/apache --with-apr=/usr/local/apr --with-apr-util=/usr/local/apr-util --with-pcre=/usr/local/pcre --with-ssl=/usr/local/ssl --enable-ssl --enable-module=so --enable-rewrite --enable-cgid --enable-cgi --with-mpm=prefork #配置
make #编译
make install #安装

posted on 2014-03-23 21:37  mancoj  阅读(2754)  评论(0)    收藏  举报

导航