web-dev-qa-db-ja.com

Postgresql 9.3のインストールが失敗する

私のubuntu lucidマシンにpostgresql 9.3をインストールしようとしています。問題は、apt-get install postgresql-9.3を実行すると、このエラーが発生することです。

=> apt-get install postgresql-9.3
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following extra packages will be installed:
  postgresql-client-9.3
Suggested packages:
  oidentd ident-server locales-all postgresql-doc-9.3
The following NEW packages will be installed:
  postgresql-9.3 postgresql-client-9.3
0 upgraded, 2 newly installed, 0 to remove and 700 not upgraded.
Need to get 8,944 kB of archives.
After this operation, 23.6 MB of additional disk space will be used.
Do you want to continue [Y/n]? Y
Get:1 http://apt.postgresql.org/pub/repos/apt/ lucid-pgdg/main postgresql-client-9.3 AMD64 9.3.2-1.pgdg10.4+1 [2,186 kB]
Get:2 http://apt.postgresql.org/pub/repos/apt/ lucid-pgdg/main postgresql-9.3 AMD64 9.3.2-1.pgdg10.4+1 [6,758 kB]
Fetched 8,944 kB in 6s (1,294 kB/s)
Selecting previously unselected package postgresql-client-9.3.
(Reading database ... 48797 files and directories currently installed.)
Unpacking postgresql-client-9.3 (from .../postgresql-client-9.3_9.3.2-1.pgdg10.4+1_AMD64.deb) ...
Selecting previously unselected package postgresql-9.3.
Unpacking postgresql-9.3 (from .../postgresql-9.3_9.3.2-1.pgdg10.4+1_AMD64.deb) ...
Setting up postgresql-client-9.3 (9.3.2-1.pgdg10.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.3 (--configure):
 subprocess installed post-installation script returned error exit status 2
No apport report written because MaxReports is reached already
                                                              dpkg: dependency problems prevent configuration of postgresql-9.3:
 postgresql-9.3 depends on postgresql-client-9.3; however:
  Package postgresql-client-9.3 is not configured yet.
dpkg: error processing postgresql-9.3 (--configure):
 dependency problems - leaving unconfigured
No apport report written because MaxReports is reached already
                                                              Errors were encountered while processing:
 postgresql-client-9.3
 postgresql-9.3
E: Sub-process /usr/bin/dpkg returned an error code (1)

私は問題を解決せずに2時間Googleで検索してきました。なぜこれが起こっているのですか、どうすれば解決できますか?

6
Linus Oleander

9.1パッケージには bug があったようですが、修正する必要があります。

リンクされたスレッドに示されているように、次のコマンドを実行することで問題を解決できます。

update-alternatives --remove postmaster.1.gz /usr/share/postgresql/9.1/man/man1/postmaster.1.gz

その後、postgresql-9.1を再インストールします。

apt-get install -f
apt-get install --reinstall postgresql-9.1
12
Milen A. Radev