[root@iZwz98lfc18pzzkm2hfl6aZ nginx]# /usr/local/nginx/sbin/nginx -t nginx: [emerg] module "/usr/local/nginx/modules/ngx_http_geoip2_module.so" is not binary compatible in /usr/local/nginx/conf/nginx.conf:3 nginx: configuration file /usr/local/nginx/conf/nginx.conf test failed
添加安装
yum install -y wget perl-ExtUtils-Embed readline-devel zlib-devel pam-devel libxml2-devel libxslt-devel gd-devel GeoIP-devel autoconf-2.69-11.el7.noarch gcc libxml2 libxml2-dev openldap-devel python-devel gcc-c++ openssl-devel cmakepcre-develnanowget gcc gcc-c++ ncurses-devel perl pcre-devel libtool libsysfs automake openssl openssl-devel redhat-rpm-config.noarch unzip libmaxminddb libunwind.x86_64 -y
yum install -y google-pertools
重新编译
./configure --add-dynamic-module=/usr/local/nginx/ngx_http_geoip2_module-3.3 --prefix=/usr/local/nginx --with-http_stub_status_module --with-http_ssl_module
make && make install
原文:https://www.cnblogs.com/yantou/p/13731617.html