-
Notifications
You must be signed in to change notification settings - Fork 2
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
请教大牛,是否遇到过类似问题:Nginx编译时,Nginx编译不通过,缺少头文件 #5
Comments
使用编译方式安装Gmssl,可以避免第一个问题 |
你检查一下src/event/ngx_event_openssl.h:17:10: fatal error: openssl/des.h: No such file or directory,到底有没有头文件,另外最好po一下make install安装OCL时的日志 |
root@debian: 老师好: |
使用master分支编译安装后,解决了 |
都解决了吗 |
|
你看看这个报错和这个类似不:#4 |
非常感谢,缺失的头文件从openssl考过来就可以了,编译已经没有问题了。 |
我之前也遇到过这个问题,然后莫名其妙消失了,好像是config的时候不指定openssl的地址就行? 你按这个流程试试 删掉本机的libssl-dev,然后重新编译安装GmSSL和OCL的master版本,再从源码编译安装nginx-1.24.0 这是我在阿里云一台空白ubuntu22.04机器上从头安装的脚本,你可以参考一下
|
编译Nginx时,会报缺少头文件,导致Nginx无法编译通过
Nginx版本为1.24
./configure --with-http_ssl_module --with-debug --without-http_rewrite_module --with-openssl=/usr/local/gmssl-3.1.1 --prefix=/usr/local/nginx
make
make -f objs/Makefile
make[1]: Entering directory '/root/workspace/nginx/nginx'
cc -c -pipe -O -W -Wall -Wpointer-arith -Wno-unused-parameter -Werror -g -I src/core -I src/event -I src/event/modules -I src/os/unix -I src/lic -I /usr/local/gmssl-3.1.1/include -I objs
-o objs/src/core/nginx.o
src/core/nginx.c
In file included from src/core/ngx_core.h:84,
from src/core/nginx.c:9:
src/event/ngx_event_openssl.h:17:10: fatal error: openssl/des.h: No such file or directory
17 | #include <openssl/des.h>
| ^~~~~~~~~~~~~~~
compilation terminated.
make[1]: *** [objs/Makefile:380: objs/src/core/nginx.o] Error 1
make[1]: Leaving directory '/root/workspace/nginx/nginx'
make: *** [Makefile:10: build] Error 2
The text was updated successfully, but these errors were encountered: