AskOverflow.Dev

AskOverflow.Dev Logo AskOverflow.Dev Logo

AskOverflow.Dev Navigation

  • 主页
  • 系统&网络
  • Ubuntu
  • Unix
  • DBA
  • Computer
  • Coding
  • LangChain

Mobile menu

Close
  • 主页
  • 系统&网络
    • 最新
    • 热门
    • 标签
  • Ubuntu
    • 最新
    • 热门
    • 标签
  • Unix
    • 最新
    • 标签
  • DBA
    • 最新
    • 标签
  • Computer
    • 最新
    • 标签
  • Coding
    • 最新
    • 标签
主页 / server / 问题 / 1007532
Accepted
Dziki_Jam
Dziki_Jam
Asked: 2020-03-20 01:47:46 +0800 CST2020-03-20 01:47:46 +0800 CST 2020-03-20 01:47:46 +0800 CST

为 Apache 构建 mod_nss

  • 772

我需要在 SLES 11 SP 4 上为 Apache 2.4.27 编译 mod_nss,因为它是我现在启用 TLS 1.2 的唯一选项。我知道使用旧版操作系统很痛苦,所以这是一个临时解决方案,因为 SLES 11 不支持 OpenSSL 1.X,所以我不能像往常一样使用 mod_ssl。

我有的:

  • Apache 2.4.27(从源安装到 /opt/apache2)
  • Apache 源代码位于 /tmp/apache2_build/httpd-2.4.27
  • 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)

我在做什么:

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

以前我遇到了与缺少os.h相关的错误,我通过创建从 apache 源目录到 /opt 中的 apache 安装的符号链接来修复它们: /opt/apache2 screenshot 我该怎么做才能解决这个问题?我试图使用 --include =参数添加到“/tmp/apache2_build/”目录的路径

apache-2.4 apache2
  • 1 1 个回答
  • 176 Views

1 个回答

  • Voted
  1. Best Answer
    Gerrit
    2020-03-20T02:40:29+08:002020-03-20T02:40:29+08:00

    mod_nss.h 包含 mod_ssl.h,因此您需要放入包含的路径。

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

    • 0

相关问题

  • Apache2 - SSL 不工作

  • Apache <VirtualHost> 标签,如果客户端的 IP = x 则不重定向... 怎么做?

  • 我无法启用我的网站?[关闭]

  • SELinux 阻止 Apache 写入文件

Sidebar

Stats

  • 问题 205573
  • 回答 270741
  • 最佳答案 135370
  • 用户 68524
  • 热门
  • 回答
  • Marko Smith

    新安装后 postgres 的默认超级用户用户名/密码是什么?

    • 5 个回答
  • Marko Smith

    SFTP 使用什么端口?

    • 6 个回答
  • Marko Smith

    命令行列出 Windows Active Directory 组中的用户?

    • 9 个回答
  • Marko Smith

    什么是 Pem 文件,它与其他 OpenSSL 生成的密钥文件格式有何不同?

    • 3 个回答
  • Marko Smith

    如何确定bash变量是否为空?

    • 15 个回答
  • Martin Hope
    Tom Feiner 如何按大小对 du -h 输出进行排序 2009-02-26 05:42:42 +0800 CST
  • Martin Hope
    Noah Goodrich 什么是 Pem 文件,它与其他 OpenSSL 生成的密钥文件格式有何不同? 2009-05-19 18:24:42 +0800 CST
  • Martin Hope
    Brent 如何确定bash变量是否为空? 2009-05-13 09:54:48 +0800 CST
  • Martin Hope
    cletus 您如何找到在 Windows 中打开文件的进程? 2009-05-01 16:47:16 +0800 CST

热门标签

linux nginx windows networking ubuntu domain-name-system amazon-web-services active-directory apache-2.4 ssh

Explore

  • 主页
  • 问题
    • 最新
    • 热门
  • 标签
  • 帮助

Footer

AskOverflow.Dev

关于我们

  • 关于我们
  • 联系我们

Legal Stuff

  • Privacy Policy

Language

  • Pt
  • Server
  • Unix

© 2023 AskOverflow.DEV All Rights Reserve