카테고리 없음

CentOS7, Nginx conflicting module versions

[czar] 2018. 10. 8. 18:36

https://nopistash.wordpress.com/2018/05/03/centos7-nginx-conflicting-module-versions/



CentOS7, Nginx conflicting module versions

Today I encountered a conflict between existing and expect nginx module versions. The error message from systemctl status nginx was:
nginx: [emerg] module "/usr/lib64/nginx/modules/ngx_http_geoip_module.so" version 1012002 instead of 1014000 in /usr/share/nginx/modules/mod-http-geoip.conf:1

After a little searching I realised that the modules was not installed from nginx official repository as the nginx server was but instead from epel, this caused the version conflict.

To solve this first uninstall all the modules from the epel repository:
$ sudo yum remove nginx-mod*

The install the modules provided by the official repository:
$ sudo yum install nginx-module-*

If you don’t want to install all the modules replace the wildcard with the specific module(s) you want. The modules can be found using sudo yum search nginx-module

And restart the server:
$ sudo systemctl restart nginx