nginx 交叉编译报错问题解决(转)

1.checking for C compiler ... found but is not working

修改auto/feature

找到 if [ -x $NGX_AUTOTEST ]; then

在前面赋值 ngx_feature_run=no

2./configure: 1: auto/types/sizeof: objs/autotest: Exec format error

修改auto/types/sizeof

找到ngx_test="$CC $CC_TEST_FLAGS $CC_AUX_FLAGS \
-o $NGX_AUTOTEST $NGX_AUTOTEST.c $NGX_LD_OPT $ngx_feature_libs"

将$CC 改成gcc

3.objs/src/os/unix/ngx_user.o: In function `ngx_libc_crypt': ngx_user.c:(.text+0x20): undefined reference to `crypt'

找到src/os/unix/ngx_user.c下的 ngx_libc_crypt 函数

将 value = crypt((char *) key, (char *) salt);

改成

value = DES_crypt((char *) key, (char *) salt);
————————————————
版权声明:本文为CSDN博主「leego1234」的原创文章,遵循CC 4.0 BY-SA版权协议,转载请附上原文出处链接及本声明。
原文链接:https://blog.csdn.net/leego1234/article/details/119647530

posted @ 2025-07-18 11:53  流逝的轻风  阅读(115)  评论(0)    收藏  举报