我正在尝试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