![Ubuntu 10.04 软件包问题](https://linux22.com/image/533621/Ubuntu%2010.04%20%E8%BD%AF%E4%BB%B6%E5%8C%85%E9%97%AE%E9%A2%98.png)
我刚刚遇到了难题,经过一番搜索,还是没能找到解决办法。
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 清除它。它给出了同样的错误。
答案1
我已经解决了这个问题。我需要从 /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
并且该包已经安装。