我上次安装了一些 GIS 包,Postgresql-9.2 刚刚与 Postgresql-9.1 一起安装。但是,当我现在进行升级时,它确实像这样完成:
$ sudo apt-get dist-upgrade
100%
Preconfiguring packages ...
0.5_i386.deb) ...
Unpacking replacement libc-bin ...
Processing triggers for man-db ...
.
.
.
.
Preparing to replace postgresql-9.1 9.1.9-0ubuntu12.04 (using .../postgresql-9.1_9.1.10-0ubuntu12.04_i386.deb) ...
* Stopping PostgreSQL 9.1 database server [ OK ]
Unpacking replacement postgresql-9.1 ...
Preparing to replace postgresql-client-9.1 9.1.9-0ubuntu12.04 (using .../postgresql-client-9.1_9.1.10-0ubuntu12.04_i386.deb) ...
Unpacking replacement postgresql-client-9.1 ...
.
.
.
Setting up postgresql-client-9.2 (9.2.4-1.pgdg12.4+1) ...
update-alternatives: error: alternative pg_basebackup.1.gz can't be slave of psql.1.gz: it is a slave of postmaster.1.gz
dpkg: error processing postgresql-client-9.2 (--configure):
subprocess installed post-installation script returned error exit status 2
.
.
.
Setting up postgresql-client-9.1 (9.1.10-0ubuntu12.04) ...
Setting up postgresql-9.1 (9.1.10-0ubuntu12.04) ...
* Starting PostgreSQL 9.1 database server [ OK ]
Setting up qemu (1.0+noroms-0ubuntu14.12) ...
Processing triggers for menu ...
Processing triggers for libc-bin ...
ldconfig deferred processing now taking place
Errors were encountered while processing:
postgresql-client-9.2
E: Sub-process /usr/bin/dpkg returned an error code (1)
所以,我试图删除 postgresql-9.2 :
$ sudo apt-get remove --purge postgresql-9.2
Reading state information... Done
Package postgresql-9.2 is not installed, so not removed
0 upgraded, 0 newly installed, 0 to remove and 1 not upgraded.
1 not fully installed or removed.
After this operation, 0 B of additional disk space will be used.
Setting up postgresql-client-9.2 (9.2.4-1.pgdg12.4+1) ...
update-alternatives: error: alternative pg_basebackup.1.gz can't be slave of psql.1.gz: it is a slave of postmaster.1.gz
dpkg: error processing postgresql-client-9.2 (--configure):
subprocess installed post-installation script returned error exit status 2
Errors were encountered while processing:
postgresql-client-9.2
E: Sub-process /usr/bin/dpkg returned an error code (1)
这个问题有什么解决办法吗?