宅基地安装GeoIp2 NGINX模块错误

我需要安装 https://github.com/leev/ngx_http_geoip2_module
当我在after.sh中重新编译nginx时,我得到一个错误,模块不是二进制兼容的,我读到了 我必须使用Nginx编译的所有原始标志来执行./configure。</ p>

所以我使用nginx -V来获取所有标志,将它们复制并粘贴在我的after.sh中,但是 现在我收到一些模块中缺少/配置文件的错误,其他模块需要库,例如:

==&gt; homestead-7:./ configure:错误:HTTP图像过滤器模块需要GD库。
==&gt; homestead-7:你可以不启用模块或安装库。
</ code> </ p>

这些给了我关于丢失文件的错误(可能是因为/ debian /目录 甚至不存在于/nginx-1.11.5/目录中我从nginx下载。

--add-dynamic-module = / build / nginx-Rrk92d / nginx-1.11.5 / debian / modules / nginx-auth-pam --add-dynamic-module = / build / nginx-Rrk92d / nginx-1.11.5 / debian / modules / nginx-echo --add-dynamic-module = / build / nginx-Rrk92d / nginx-1.11.5 / debian / modules / nginx-upstream-fair --add-dynamic-module = / build / nginx-Rrk92d / nginx-1.11.5 / debian / modules / ngx_http_substitutions_filter_module
</ code> </ p >

任何人都有这方面的经验,可以指出如何以正确的方式做到这一点?</ p>
</ div>

展开原文

原文

I need to install the https://github.com/leev/ngx_http_geoip2_module on my Homestead. When I recompile nginx in my after.sh first I got an error that the module is not binary compatible, I read that I have to do ./configure with all the original flags Nginx was compiled with.

So I used nginx -V to get all flags, copy&pasted them in my after.sh, but now I am getting errors about missing /config files in some of the modules and other modules need libraries, like: ==> homestead-7: ./configure: error: the HTTP image filter module requires the GD library. ==> homestead-7: You can either do not enable the module or install the libraries.

These here gave me errors about missing files (probably because the /debian/ directory doesn't even exist in the /nginx-1.11.5/ dir I download from nginx. --add-dynamic-module=/build/nginx-Rrk92d/nginx-1.11.5/debian/modules/nginx-auth-pam --add-dynamic-module=/build/nginx-Rrk92d/nginx-1.11.5/debian/modules/nginx-echo --add-dynamic-module=/build/nginx-Rrk92d/nginx-1.11.5/debian/modules/nginx-upstream-fair --add-dynamic-module=/build/nginx-Rrk92d/nginx-1.11.5/debian/modules/ngx_http_substitutions_filter_module

Anybody have experience with this kind of thing and can give me pointers how to do this the right way?

donglang1894
donglang1894 来自官方nginx网站的wget。1.11.5:wgetnginx.org/download/nginx-VERSION.tar.gztarzxvfnginx-VERSION.tar.gzcdnginx-VERSION
3 年多之前 回复
dongti8535
dongti8535 你在哪里安装NGINX?
3 年多之前 回复

1个回答



我首先卸载nginx,然后下载最新的稳定版本并在安装GeoIp2模块之前从源代码重新编译nginx,然后它工作 喜欢魅力。</ p>
</ div>

展开原文

原文

I ended up deinstalling nginx first, then download the newest stable version and recompiling nginx from source before i install the GeoIp2 module, then it works like a charm.

Csdn user default icon
上传中...
上传图片
插入图片
抄袭、复制答案,以达到刷声望分或其他目的的行为,在CSDN问答是严格禁止的,一经发现立刻封号。是时候展现真正的技术了!
立即提问
相关内容推荐