我需要在SLES11SP4上为Apache2.4.27编译mod_nss,因为这是现在启用TLS1.2的唯一选项。我知道使用遗留操作系统很痛苦,所以它只是一个临时解决方案,因为SLES 11不支持OpenSSL 1.X,所以我不能像往常一样使用mod_ssl。
我所拥有的:
我所做的是:
cd <mod_nss_sourcecode_dir>
autoreconf -ivf
./configure --with-apxs=/opt/apache2/bin/apxs
gmake all install最后一个命令返回以下输出:
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
发布于 2020-03-19 10:40:29
mod_nss.h确实包含了mod_ssl.h,所以您需要放入一个包含的路径。
您可以在Apache源代码的模块/ssl目录中找到它。
https://serverfault.com/questions/1007532
复制相似问题