apache源码编译时报错ssl_engine_init.c:546: error: 'STACK' undeclared (first use in this function)

简介:

操作系统:centos6.4 X86_64

apache版本:httpd-2.2.6

openssl版本:openssl-1.0.1e


源码编译apache时报如下错误:

ssl_engine_init.c: In function 'ssl_init_ctx_protocol':
ssl_engine_init.c:390: warning: assignment discards qualifiers from pointer target type
ssl_engine_init.c:396: warning: assignment discards qualifiers from pointer target type
ssl_engine_init.c: In function 'ssl_init_ctx_verify':
ssl_engine_init.c:546: error: 'STACK' undeclared (first use in this function)
ssl_engine_init.c:546: error: (Each undeclared identifier is reported only once
ssl_engine_init.c:546: error: for each function it appears in.)
ssl_engine_init.c:546: error: expected expression before ')' token
ssl_engine_init.c: In function 'ssl_init_FindCAList':
ssl_engine_init.c:1126: warning: pointer type mismatch in conditional expression
make[4]: *** [ssl_engine_init.slo] 错误 1
make[4]: Leaving directory `/software/httpd-2.2.6/modules/ssl'
make[3]: *** [shared-build-recursive] 错误 1
make[3]: Leaving directory `/software/httpd-2.2.6/modules/ssl'
make[2]: *** [shared-build-recursive] 错误 1
make[2]: Leaving directory `/software/httpd-2.2.6/modules'
make[1]: *** [shared-build-recursive] 错误 1
make[1]: Leaving directory `/software/httpd-2.2.6'
make: *** [all-recursive] 错误 1


原因分析:apache2.x  和openssl1.0.x不兼容导致的

解决方法:安装openssl0.9.8e

安装步骤:

1
2
3
4
5
6
7
8
9
10
11
12
# tar zxvf openssl-0.9.8e.tar.gz
# cd openssl-0.9.8e
# ./config shared zlib
# make 
# make test
# make install
# mv /usr/bin/openssl /usr/bin/openssl.OFF
# mv /usr/include/openssl /usr/include/openssl.OFF
# rm -rf /usr/lib/libssl.so
# ln -s /usr/local/ssl/bin/openssl /usr/bin/openssl
# ln -s /usr/local/ssl/include/openssl /usr/include/openssl
# ln -sv /usr/local/ssl/lib/libssl.so.0.9.8  /usr/lib/libssl.so


 

配置库文件搜索路径

1
2
# echo "/usr/local/ssl/lib" >> /etc/ld.so.conf
# ldconfig -v


 

检测安装结果

1
# openssl version


OpenSSL 0.9.8e 23 Feb 2007


安装成功!


重新编译apache,编译时参数加上 --enable-ssl --with-ssl=/usr/local/ssl


问题解决。











本文转自月魔zhi蕾51CTO博客,原文链接:  http://blog.51cto.com/308107405/1537541 ,如需转载请自行联系原作者
相关文章
|
12月前
|
API C++
【Azure 环境】VS Code登录China Azure(Function)报错 An error occurred while signing in: invalid_request - AADSTS65002
An error occurred while signing in: invalid_request - AADSTS65002: Consent between first party application 'c27c220f-ce2f-4904-927d-333864217eeb' and first party resource '797f4846-ba00-4fd7-ba43-dac1f8f63013' must be configured via preauthorization - applications owned and operated by Microsoft mus
523 13
|
资源调度 前端开发 开发工具
apache-incubator-streampark源码编译本地运行
apache-incubator-streampark源码编译本地运行
353 0
|
Java Windows
【Azure Function】部署Java Function失败:报错deploy [ERROR] Status code 401和警告 'China North 3' may not be a valid region
1:deploy [ERROR] Status code 401, (empty body). 2: China North 3 may not be a valid region,please refer to https://aka.ms/maven_function_configuration#supported-regions for values. 3:  <azure.functions.maven.plugin.version>1.36.0</azure.functions.maven.plugin.version>
518 11
Fatal error: Call to undefined function openssl_pkey_get_private()
Fatal error: Call to undefined function openssl_pkey_get_private()
313 0
|
前端开发
Error in created hook: “TypeError: _test.default is not a function
Error in created hook: “TypeError: _test.default is not a function
|
Java API Apache
【Apache ShenYu源码】看看贡献者如何实现支持提醒通知设计
在阅读中,还发现了有个html文件忘记加了开源协议,我们提下PR修复下,又收获了一次开源贡献!!PR提交戳这。
260 1
【Apache ShenYu源码】看看贡献者如何实现支持提醒通知设计
|
Python
【Azure 应用服务】Azure Function HTTP Trigger 遇见奇妙的500 Internal Server Error: Failed to forward request to http://169.254.130.x
【Azure 应用服务】Azure Function HTTP Trigger 遇见奇妙的500 Internal Server Error: Failed to forward request to http://169.254.130.x
356 0
【Azure 应用服务】Azure Function 启用 Managed Identity后, Powershell Funciton出现 ERROR: ManagedIdentityCredential authentication failed
【Azure 应用服务】Azure Function 启用 Managed Identity后, Powershell Funciton出现 ERROR: ManagedIdentityCredential authentication failed
411 0
|
存储 SQL 关系型数据库
Apache Doris 聚合函数源码阅读与解析|源码解读系列
Apache Doris Active Contributor 隐形通过本文记录下对源码的理解,以方便新人快速上手源码开发。
749 1
Apache Doris 聚合函数源码阅读与解析|源码解读系列
|
存储 缓存 负载均衡
【Apache ShenYu源码】如何实现负载均衡模块设计
整个模块为ShenYu提供了什么功能。我们可以看下上文我们提到的工厂对象。/***/核心方法很清晰,我们传入Upsteam列表,通过这个模块的负载均衡算法,负载均衡地返回其中一个对象。这也就是这个模块提供的功能。
342 1

热门文章

最新文章

推荐镜像

更多