【问题标题】:add Nginx 1.20.1 GeoIP2 module添加 Nginx 1.20.1 GeoIP2 模块
【发布时间】:2021-09-16 15:09:39
【问题描述】:

我正在尝试configure nginx 来构建 GeoIP2 模块,遵循以下安装: https://github.com/leev/ngx_http_geoip2_module

首先我还是不明白 staticdynamic 模块之间的定义是什么, 为什么我不能apt install那个模块..

问题是我想在不同的机器上构建/创建它,所以我必须通过复制此命令的输出从目标机器复制 configure 标志:

nginx -V

然后我在测试机器上运行了这个命令:

PKG_CONFIG_PATH="/usr/lib/x86_64-linux-gnu/pkgconfig/" ./configure --without-http_rewrite_module --without-http_gzip_module --add-module=/path/ngx_http_geoip2_module-3.3 (PASTE DESTINATION NGINX -V OUTPUT)
make
make install

然后我连续复制文件名:ngx_http_geoip2_module.so 到目标机器 然后跑nginx -t 我收到了这个错误:

nginx: [emerg] module "/etc/nginx/modules/ngx_http_geoip2_module.so" is not binary compatible in /etc/nginx/nginx.conf
nginx: configuration file /etc/nginx/nginx.conf test failed

我的目标机器: Ubuntu 20 Nginx 1.20.1

【问题讨论】:

    标签: nginx geoip geoip2 nginx-module


    【解决方案1】:

    --with-compat --add-module=/path/to/ngx_http_geoip2_module
    要么
    --with-compat --add-dynamic-module=/path/to/ngx_http_geoip2_module

    【讨论】:

    • 正如目前所写,您的答案尚不清楚。请edit 添加其他详细信息,以帮助其他人了解这如何解决所提出的问题。你可以找到更多关于如何写好答案的信息in the help center
    猜你喜欢
    • 2017-06-03
    • 2020-07-07
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2020-08-16
    • 2015-05-30
    • 2011-03-31
    • 2018-05-02
    相关资源
    最近更新 更多