nginx –t
报错
nginx: [emerg] module "/usr/lib64/nginx/modules/ngx_http_geoip_module.so" version 1012002 instead of 1014001 in /usr/share/nginx/modules/mod-http-geoip.conf:1
解决方案 1
卸载 再安装
yum remove nginx
yum update nginx
yum install -y nginx
systemctl start nginx
systemctl enable nginx
解决方案二
sudo yum remove nginx-mod*
sudo yum install nginx-module-*
sudo yum search nginx-module
sudo systemctl restart nginx
yum search nginx-module
Loaded plugins: fastestmirror, langpacks
Loading mirror speeds from cached hostfile
* epel: mirror.ehost.vn
========================================================== N/S matched: nginx-module ==========================================================
nginx-module-geoip-debuginfo.x86_64 : Debug information for package nginx-module-geoip
nginx-module-image-filter-debuginfo.x86_64 : Debug information for package nginx-module-image-filter
nginx-module-njs-debuginfo.x86_64 : Debug information for package nginx-module-njs
nginx-module-perl-debuginfo.x86_64 : Debug information for package nginx-module-perl
nginx-module-xslt-debuginfo.x86_64 : Debug information for package nginx-module-xslt
nginx-module-geoip.x86_64 : nginx GeoIP dynamic modules
nginx-module-image-filter.x86_64 : nginx image filter dynamic module
nginx-module-njs.x86_64 : nginx njs dynamic modules
nginx-module-perl.x86_64 : nginx Perl dynamic module
nginx-module-xslt.x86_64 : nginx xslt dynamic module