首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >为Apache构建mod_nss

为Apache构建mod_nss
EN

Server Fault用户
提问于 2020-03-19 09:47:46
回答 1查看 217关注 0票数 0

我需要在SLES11SP4上为Apache2.4.27编译mod_nss,因为这是现在启用TLS1.2的唯一选项。我知道使用遗留操作系统很痛苦,所以它只是一个临时解决方案,因为SLES 11不支持OpenSSL 1.X,所以我不能像往常一样使用mod_ssl。

我所拥有的:

  • Apache2.4.27(从源代码安装到/opt/apache2)
  • 位于/tmp/apache2_build/httpd-2.4.27中的Apache源代码
  • Mod_nss源代码:https://releases.pagure.org/mod_nss/
  • 操作系统: SLES 11 SP 4
  • 从先决条件包安装(mozilla-nss-devel-3.47.1-38.12.1,mozilla-nspr-devel-4.23-29.9.1)

我所做的是:

代码语言:javascript
复制
cd <mod_nss_sourcecode_dir>
autoreconf -ivf
./configure --with-apxs=/opt/apache2/bin/apxs
gmake all install

最后一个命令返回以下输出:

代码语言:javascript
复制
gmake  all-am
gmake[1]: Entering directory `/tmp/apache2_build/httpd-2.4.27/modules/mod_nss-mod_nss1018'
/bin/sh ./libtool --mode=compile gcc -DHAVE_CONFIG_H -I.  -I/opt/apache2/include -I/usr/include/nspr4   -I/usr/include/nss3 -I/usr/include/nspr4    -I/usr/include/apr-1  -I/usr/include/nspr4    -g -O2 -Werror=implicit-function-declaration -DLINUX -D_REENTRANT -D_GNU_SOURCE -DENABLE_CHACHA20 -DENABLE_SERVER_DHE -DNSS_SUPPORTS_TLS_1_3 -MT mod_nss.lo -MD -MP -MF .deps/mod_nss.Tpo -c -o mod_nss.lo mod_nss.c
libtool: compile:  gcc -DHAVE_CONFIG_H -I. -I/opt/apache2/include -I/usr/include/nspr4 -I/usr/include/nss3 -I/usr/include/nspr4 -I/usr/include/apr-1 -I/usr/include/nspr4 -g -O2 -Werror=implicit-function-declaration -DLINUX -D_REENTRANT -D_GNU_SOURCE -DENABLE_CHACHA20 -DENABLE_SERVER_DHE -DNSS_SUPPORTS_TLS_1_3 -MT mod_nss.lo -MD -MP -MF .deps/mod_nss.Tpo -c mod_nss.c  -fPIC -DPIC -o .libs/mod_nss.o
In file included from /opt/apache2/include/httpd.h:44,
                 from mod_nss.h:20,
                 from mod_nss.c:16:
/opt/apache2/include/ap_config.h:136:16: error: os.h: No such file or directory
In file included from mod_nss.c:16:
mod_nss.h:28:21: error: mod_ssl.h: No such file or directory
mod_nss.c:253: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘*’ token
mod_nss.c:254: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘*’ token
mod_nss.c: In function ‘nss_proxy_enable’:
mod_nss.c:310: error: ‘othermod_proxy_enable’ undeclared (first use in this function)
mod_nss.c:310: error: (Each undeclared identifier is reported only once
mod_nss.c:310: error: for each function it appears in.)
mod_nss.c:313: error: implicit declaration of function ‘othermod_proxy_enable’
mod_nss.c: In function ‘nss_engine_disable’:
mod_nss.c:339: error: ‘othermod_engine_disable’ undeclared (first use in this function)
mod_nss.c:340: error: implicit declaration of function ‘othermod_engine_disable’
mod_nss.c: In function ‘nss_register_hooks’:
mod_nss.c:588: error: ‘othermod_proxy_enable’ undeclared (first use in this function)
mod_nss.c:588: error: ‘apr_OFN_ssl_proxy_enable_t’ undeclared (first use in this function)
mod_nss.c:588: error: expected expression before ‘)’ token
mod_nss.c:589: error: ‘othermod_engine_disable’ undeclared (first use in this function)
mod_nss.c:589: error: ‘apr_OFN_ssl_engine_disable_t’ undeclared (first use in this function)
mod_nss.c:589: error: expected expression before ‘)’ token
mod_nss.c:595: error: ‘apu__opt’ undeclared (first use in this function)
gmake[1]: *** [mod_nss.lo] Error 1
gmake[1]: Leaving directory `/tmp/apache2_build/httpd-2.4.27/modules/mod_nss-mod_nss1018'
gmake: *** [all] Error 2

以前,我在/opt:/opt/apache2截图中创建了一个从apache到apache的符号链接,修复了与os.h缺位相关的错误:我能做些什么来修复这个问题呢?我试图使用--include=参数将路径添加到"/tmp/apache2_build/“dir

EN

回答 1

Server Fault用户

回答已采纳

发布于 2020-03-19 10:40:29

mod_nss.h确实包含了mod_ssl.h,所以您需要放入一个包含的路径。

您可以在Apache源代码的模块/ssl目录中找到它。

票数 0
EN
页面原文内容由Server Fault提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://serverfault.com/questions/1007532

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档