apache 来源的httpd建置上遗漏asn1.h

kupeojn6  于 2022-11-16  发布在  Apache
关注(0)|答案(2)|浏览(157)

我一直在尝试从源代码构建httpd-2.4.43,并包含了OpenSSL-fips-2.0.16
然而,我在httpd的构建过程中遇到了一个错误。请参阅下面的内容;

make[2]: Entering directory `/root/httpd/httpd-2.4.43/support'
/root/httpd/httpd-2.4.43/srclib/apr/libtool --silent --mode=compile gcc -std=gnu99 -I/opt/openssl-fips-2.0.16/include  -g -O2 -pthread      -DLINUX -D_REENTRANT -D_GNU_SOURCE   \
      -I. -I/root/httpd/httpd-2.4.43/os/unix -I/root/httpd/httpd-2.4.43/include -I/root/httpd/httpd-2.4.43/srclib/apr/include -I/root/httpd/httpd-2.4.43/srclib/apr-util/include -I/usr/local/include -I/root/httpd/httpd-2.4.43/modules/aaa -I/root/httpd/httpd-2.4.43/modules/cache -I/root/httpd/httpd-2.4.43/modules/core -I/root/httpd/httpd-2.4.43/modules/database -I/root/httpd/httpd-2.4.43/modules/filters -I/root/httpd/httpd-2.4.43/modules/ldap -I/root/httpd/httpd-2.4.43/server -I/root/httpd/httpd-2.4.43/modules/loggers -I/root/httpd/httpd-2.4.43/modules/lua -I/root/httpd/httpd-2.4.43/modules/proxy -I/root/httpd/httpd-2.4.43/modules/http2 -I/root/httpd/httpd-2.4.43/modules/session -I/root/httpd/httpd-2.4.43/modules/ssl -I/root/httpd/httpd-2.4.43/modules/test -I/root/httpd/httpd-2.4.43/server -I/root/httpd/httpd-2.4.43/modules/md -I/root/httpd/httpd-2.4.43/modules/arch/unix -I/root/httpd/httpd-2.4.43/modules/dav/main -I/root/httpd/httpd-2.4.43/modules/generators -I/root/httpd/httpd-2.4.43/modules/mappers  -prefer-non-pic -static -c ab.c && touch ab.lo
In file included from ab.c:161:0:
/opt/openssl-fips-2.0.16/include/openssl/rsa.h:62:26: fatal error: openssl/asn1.h: No such file or directory
 #include <openssl/asn1.h>
                          ^
compilation terminated.
make[2]: *** [ab.lo] Error 1

上述错误消息指出缺少asn1.h
我不知道在哪里可以找到它。也许有一个从源代码构建OpenSSL的过程丢失了?我觉得我在从源代码构建OpenSSL时错过了一些东西。
请一定要给我指出正确的方向。

hi3rlvi2

hi3rlvi21#

修复了它。显然,当我搜索资源时,我发现了asn1.h的问题,而不知道rsa. h部分包含asn1.h。
因此,我们发现这是由于在构建openssl时存在 *ssl-devel依赖关系。
因此,请在构建环境中安装 *ssl-devel openssl-devel for RHEL/Fedora libssl-devel for Debian
然后重建OpenSSL,再重建httpd

nszi6y05

nszi6y052#

您必须安装OpenSSL开发包,它在所有现代Linux发行版的标准存储库中都有提供。
在Debian、Ubuntu或其衍生产品上安装OpenSSL开发包:

sudo apt-get install libssl-dev

在Fedora、CentOS或RHEL上安装OpenSSL开发包:

sudo yum install openssl-devel

相关问题