我正在使用 Ubuntu 10.04 并尝试从我的机器中删除 postgresql-client-common,但出现以下错误:
E: postgresql-9.2: subprocess installed pre-removal script returned error exit status 2
E: postgresql-client-9.2: subprocess installed pre-removal script returned error exit status 2
E: postgresql-common: subprocess installed pre-removal script returned error exit status 2
我尝试过:sudo apt-get -f install
,但也失败了:
lucid@ubuntu:~$ sudo apt-get -f install
Reading package lists... Done
Building dependency tree
Reading state information... Done
Correcting dependencies... Done
The following packages will be REMOVED:
postgresql-9.2 postgresql-client-9.2 postgresql-client-common
postgresql-common
0 upgraded, 0 newly installed, 4 to remove and 561 not upgraded.
4 not fully installed or removed.
After this operation, 23.6MB disk space will be freed.
Do you want to continue [Y/n]? y
(Reading database ... 131347 files and directories currently installed.)
Removing postgresql-9.2 ...
dpkg (subprocess): unable to execute installed pre-removal script: Exec format error
dpkg: error processing postgresql-9.2 (--remove):
subprocess installed pre-removal script returned error exit status 2
dpkg (subprocess): unable to execute installed post-installation script: Exec format error
dpkg: error while cleaning up:
subprocess installed post-installation script returned error exit status 2
Removing postgresql-client-9.2 ...
dpkg (subprocess): unable to execute installed pre-removal script: Exec format error
dpkg: error processing postgresql-client-9.2 (--remove):
subprocess installed pre-removal script returned error exit status 2
Removing postgresql-common ...
dpkg (subprocess): unable to execute installed pre-removal script: Exec format error
dpkg: error processing postgresql-common (--remove):
subprocess installed pre-removal script returned error exit status 2
Removing postgresql-client-common ...
dpkg (subprocess): unable to execute installed post-removal script: Exec format error
dpkg: error processing postgresql-client-common (--remove):
subprocess installed post-removal script returned error exit status 2
No apport report written because MaxReports is reached already
Errors were encountered while processing:
postgresql-9.2
postgresql-client-9.2
postgresql-common
postgresql-client-common
E: Sub-process /usr/bin/dpkg returned an error code (1)
我该如何修复这个问题?
答案1
我描述了一个类似问题的解决方案。也许它也能解决你的问题。