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


Posted by [czar]
,

Remove residual config files in Ubuntu – A one liner

I have spent literally hours over the last year or two searching for an elegant way to remove configuration files left over from package installs, in a command line environment, with Ubuntu.

Googling would provide a frustrating list of solutions that would either involve installing extra packages, using a complicated command line, or script, solutions that I would never be happy with and would “redo” the search again, each time I wanted to perform the same task, in the hope of finding something better.

In the end Aptitude and Xargs were my friends. Without further ado ….

aptitude -F %p search '~c' | xargs dpkg -P

Please note this command is meant for server/cli environments only. Desktop users should use Synaptics and the “Not Installed (residual config)” status. Nanny out.


https://johnlewis.ie/remove-residual-config-files-in-ubuntu-a-one-liner/


Posted by [czar]
,