错误undefined reference to TLSv1_2_client_method

安装apache时出现错误:

ab.o: In function `main':
/xxx/httpd-2.4.x/support/ab.c:2273: undefined reference to `TLSv1_2_client_method'
/xxx/httpd-2.4.x/support/ab.c:2271: undefined reference to `TLSv1_1_client_method'
collect2: ld returned 1 exit status
make[2]: *** [ab] Error 1
make[2]: Leaving directory `/xxx/httpd-2.4.x/support'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/xxx/httpd-2.4.x/support'
make: *** [all-recursive] Error 1

解决方法:open-ssl 库有问题, 重新安装openssl

cd openssl-1.0.2k
./config -fPIC  shared zlib
./config -t
make depend
make
make test
make install

openssl version -a

重新编译httpd

 ./configure --prefix=/xxx/apache2.4.25 --with-apr=/usr/local/apr --with-apr-util=/usr/local/apr-util --with-pcre=/usr/local/pcre --with-ssl=/usr/local/ssl --enable-so
make && make install

就可以了

最后编辑于
©著作权归作者所有,转载或内容合作请联系作者
【社区内容提示】社区部分内容疑似由AI辅助生成,浏览时请结合常识与多方信息审慎甄别。
平台声明:文章内容(如有图片或视频亦包括在内)由作者上传并发布,文章内容仅代表作者本人观点,简书系信息发布平台,仅提供信息存储服务。

相关阅读更多精彩内容

友情链接更多精彩内容