c - 由于结构'crypt_data'没有名为'current_salt'的成员,nginx的编译失败
问题描述
我正在尝试使用 GCC 在 Ubuntu 机器上编译 nginx。我的 Glibc 版本是 2.31。
m@feynman:~/Junk/nginx-1.9.9
$ /lib/x86_64-linux-gnu/libc.so.6 --version
GNU C Library (Ubuntu GLIBC 2.31-0ubuntu9.2) stable release version 2.31.
我从https://nginx.org/download/下载了一堆不同的版本,并尝试使用它们,但每次都失败。
./configure --with-threads --with-http_ssl_module --with-cc-opt="-Wno-error"
make
./configure 生成以下文件objs/Makefile
:
CC = cc
CFLAGS = -pipe -O -W -Wall -Wpointer-arith -Wno-unused -Werror -g -Wno-error
CPP = cc -E
LINK = $(CC)
...
这给了我下面的这个错误。
cc -c -pipe -O -W -Wall -Wpointer-arith -Wno-unused -Werror -g -Wno-error -I src/core -I src/event -I src/event/modules -I src/os/unix -I objs \
-o objs/src/os/unix/ngx_posix_init.o \
src/os/unix/ngx_posix_init.c
cc -c -pipe -O -W -Wall -Wpointer-arith -Wno-unused -Werror -g -Wno-error -I src/core -I src/event -I src/event/modules -I src/os/unix -I objs \
-o objs/src/os/unix/ngx_user.o \
src/os/unix/ngx_user.c
src/os/unix/ngx_user.c: In function ‘ngx_libc_crypt’:
src/os/unix/ngx_user.c:36:7: error: ‘struct crypt_data’ has no member named ‘current_salt’
36 | cd.current_salt[0] = ~salt[0];
| ^
make[1]: *** [objs/Makefile:749: objs/src/os/unix/ngx_user.o] Error 1
make[1]: Leaving directory '/home/m/Junk/nginx-1.9.9'
make: *** [Makefile:8: build] Error 2
我尝试安装 SSL lib 和其他类似的库,并认为它会有所帮助,但没有任何效果。
sudo apt install libpcre3-dev libssl-dev
解决方案
推荐阅读
- ruby-on-rails - Chrome doesn't start in WSL (Ubuntu 18.04) with "DevToolsActivePort file doesn't exist" under Chromedriver
- php - Remote mail() function
- swiftui - 如何在 SwiftUI 中将字体粗细更改为中等?
- python - 无效的凭据引发身份验证突变异常
- vue.js - 类型错误:e 不是函数
- javascript - 将 javascript 中的 Protobuf 模式转换为单独的 proto 定义文件
- laravel - 更改值状态时的 ID 问题
- aws-glue - 从 Redshift 读取数据并将其写入分区中的 S3
- c++ - Spirit X3, Is this error handling approach useful?
- javascript - Why is it possible to access form values in the inline event handler?