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.

link|improve this question
1  
Instead of making the Subject Solved. Can you post the solution as an answer below. Then when you can mark it as accepted? – Kyle Brandt Dec 20 '10 at 16:10
feedback

1 Answer

up vote 0 down vote accepted

I've solved the problem. I needed to delete the definition from /var/lib/dpkg/info and then uninstall went smooth.

root@server:/var/lib/dpkg/info# rm libapache2-mod-geoip.*
root@server:~# sudo apt-get purge libapache2-mod-geoip
root@server:~# sudo apt-get install libapache2-mod-geoi

and the package as been installed.

link|improve this answer
(on behalf of bibstha) – Kyle Brandt Dec 20 '10 at 16:18
Thanks, I'm still new to serverfault. Thanks for letting me know. – bibstha Dec 22 '10 at 4:11
@bibstha: Thanks for posting this information here. There is often a bit of a learning curve to our system, but the idea that in the end it is easy for future people to find the answer to their problem without much effort. – Kyle Brandt Dec 22 '10 at 14:05
feedback

Your Answer

 
or
required, but never shown

Not the answer you're looking for? Browse other questions tagged or ask your own question.