源码下载

https://nginx.org/en/download.html

交叉编译

https://blog.csdn.net/enthu1997/article/details/105262110
https://zhuanlan.zhihu.com/p/591025497?utm_id=0&wd=&eqid=8bd518de0000bf6300000006647b202b

编译中报错

  • ngx_murmurhash.c:37:11: error: this statement may fall through [-Werror=implicit-fallthrough=]
    https://blog.csdn.net/cpdd685/article/details/130542556

  • checking for C compiler ... found but is not working 及 objs/src/os/unix/ngx_user.o: In function ngx_libc_crypt': ngx_user.c:(.text+0x20): undefined reference to crypt'

https://blog.csdn.net/leego1234/article/details/119647530

其中`undefined reference to `crypt'`问题,编译并链接了crypt动态库,仍然报错。

相关第三方模块编译与加载

  • pcre模块 (正则表达式模块)
    下载:https://github.com/PCRE2Project/pcre2/releases

    ./configure --host=aarch64-linux CC=which aarch64-linux-gnu-gcc  CXX=which aarch64-linux-gnu-g++

    采用make install,默认pcre编译后的so库会安装到/usr/local/lib,在编译nginx时./configure --with-pcre会自动寻找到pcre库。

分类: Nginx

0 条评论

发表回复

您的电子邮箱地址不会被公开。