Ubuntu 10.04包的问题

我刚刚撞上了一堵墙,search了这么多之后,一直没有find解决办法。

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) 

软件包libapache2-mod-geoip没有正确安装,我无法用dpkg-reconfigure重新安装它,或者使用dpkg -P libapache2-mod-geoip来清除它。 它给了我同样的错误。

我已经解决了这个问题。 我需要从/ var / lib / dpkg / info删除定义,然后卸载顺利。

 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 

和包已经安装。