nginx 从源码编译

nginx compiling from source

我们需要在 nginx 中包含 sticky 指令;所以我们按照 link http://nginx.org/en/docs/howto_build_on_win32.html 中的步骤操作。 但是我们遇到以下错误:

 In file included from src/core/ngx_core.h:71:0,
        from src/core/nginx.c:9:
 src/core/ngx_regex.h:15:18: fatal error: pcre.h: No such file or directory

这个link有类似的问题 Error building : fatal error: pcre.h: No such file or directory 但我使用的是最新的 pcre,即 pcre2-10.10

任何人都可以告诉我如何解决这个问题或者我可以从哪个位置下载带有粘性模块的 nginx

只是不要使用 pcre2。你需要像 pcre-8.36 这样的 pcre。