【发布时间】:2021-09-16 15:09:39
【问题描述】:
我正在尝试configure nginx 来构建 GeoIP2 模块,遵循以下安装:
https://github.com/leev/ngx_http_geoip2_module
首先我还是不明白 static 和 dynamic 模块之间的定义是什么,
为什么我不能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