I've just hit a wall, and after searching so much, haven't been able to figure out a solution for this.
root@server:# apt-get remove libapache2-mod-geoip Reading package lists... Done Building dependency tree Reading state information... Done The following packages will be REMOVED: libapache2-mod-geoip 0 upgraded, 0 newly installed, 1 to remove and 0 not upgraded. 1 not fully installed or removed. After this operation, 115kB disk space will be freed. Do you want to continue [Y/n]? Y (Reading database ... 64325 files and directories currently installed.) Removing libapache2-mod-geoip ... ERROR: Module geoip does not exist! dpkg: error processing libapache2-mod-geoip (--remove): subprocess installed post-removal script returned error exit status 1 Errors were encountered while processing: libapache2-mod-geoip E: Sub-process /usr/bin/dpkg returned an error code (1)
The package libapache2-mod-geoip isn't properly installed either, and I am unable to re-install it with dpkg-reconfigure or purge it using dpkg -P libapache2-mod-geoip. It gives me the same error.