
私は壁にぶつかってしまい、いろいろ調べたのですが、解決策を見つけることができませんでした。
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
パッケージがインストールされました。