postgresql-9.1 9.1.4-3~ppa1~precise1 failed to upgrade

Asked by Geoff Riley

geoffr@geoff-ubuntu:~$ uname -a
Linux geoff-ubuntu 3.2.0-29-generic #46-Ubuntu SMP Fri Jul 27 17:03:23 UTC 2012 x86_64 x86_64 x86_64 GNU/Linux

Performing a normal update process; a crash reporter popped up with the report:
"package postgresql-9.1 9.1.4-3~ppa1~precise1 failed to install/upgrade: trying to overwrite '/usr/share/postgresql/9.1/man/man1/pg_basebackup.1.gz', which is also in package postgresql-client-9.1 9.1.4-3~ppa1~precise1"

Relevant section from install log:
Preparing to replace postgresql-contrib-9.1 9.1.4-3~ppa1~precise1 (using .../postgresql-contrib-9.1_9.1.5-0ubuntu12.04_amd64.deb) ...
Unpacking replacement postgresql-contrib-9.1 ...
Preparing to replace postgresql-9.1 9.1.4-3~ppa1~precise1 (using .../postgresql-9.1_9.1.5-0ubuntu12.04_amd64.deb) ...
 * Stopping PostgreSQL 9.1 database server
[ OK ]
Unpacking replacement postgresql-9.1 ...
dpkg: error processing /var/cache/apt/archives/postgresql-9.1_9.1.5-0ubuntu12.04_amd64.deb (--unpack):
 trying to overwrite '/usr/share/postgresql/9.1/man/man1/pg_basebackup.1.gz', which is also in package postgresql-client-9.1 9.1.4-3~ppa1~precise1
dpkg-deb: error: subprocess paste was killed by signal (Broken pipe)
dpkg: considering deconfiguration of postgresql-9.1, which would be broken by installation of postgresql-client-9.1 ...
dpkg: yes, will deconfigure postgresql-9.1 (broken by postgresql-client-9.1).
Preparing to replace postgresql-client-9.1 9.1.4-3~ppa1~precise1 (using .../postgresql-client-9.1_9.1.5-0ubuntu12.04_amd64.deb) ...
De-configuring postgresql-9.1 ...
 * Stopping PostgreSQL 9.1 database server
[ OK ]
Unpacking replacement postgresql-client-9.1 ...
Preparing to replace postgresql-doc-9.1 9.1.4-3~ppa1~precise1 (using .../postgresql-doc-9.1_9.1.5-0ubuntu12.04_all.deb) ...
Unpacking replacement postgresql-doc-9.1 ...

Is this a package bug or is it just something daft on my machine - I could understand it if this was something I'd played with, but I haven't done anything other than use postgresql as a database tool?

Any suggestions?

Question information

Language:
English Edit question
Status:
Solved
For:
Ubuntu postgresql-9.1 Edit question
Assignee:
No assignee Edit question
Solved by:
actionparsnip
Solved:
Last query:
Last reply:
Revision history for this message
Geoff Riley (geoffr) said :
#1

Further to the above:

When attempting to run update-manager again I receive an error box titled 'The package system is broken', containing the following:

The following packages have unmet dependencies:

postgresql-client-9.1: Depends: zlib1g (>= 1:1.1.4) but 1:1.2.3.4.dfsg-3ubuntu4 is installed
                       Depends: postgresql-client-common (>= 115~) but 134~ppa1~precise1 is installed
postgresql-contrib-9.1: Depends: postgresql-9.1 (= 9.1.5-0ubuntu12.04) but 9.1.4-3~ppa1~precise1 is installed
                        Depends: zlib1g (>= 1:1.1.4) but 1:1.2.3.4.dfsg-3ubuntu4 is installed
                        Depends: postgresql-common (>= 115~) but 134~ppa1~precise1 is installed

I'll try running 'apt-get install -f' as suggested in the dialog.

Revision history for this message
Best actionparsnip (andrew-woodhead666) said :
#2

sudo dpkg --force-all -i /var/cache/apt/archives/postgresql-9.1_9.1.5-0ubuntu12.04_amd64.deb

I suggest you tell the PPA maintainer as their is an overlap in the packages (as you can see) this needs fixing.

Revision history for this message
actionparsnip (andrew-woodhead666) said :
#3

also run:

sudo apt-get -f install

If you use unofficial sources for packages, you can get issues like this.

Revision history for this message
Geoff Riley (geoffr) said :
#4

Thank you Andrew,

sudo dpkg --force-all -i /var/cache/apt/archives/postgresql-9.1_9.1.5-0ubuntu12.04_amd64.deb

did indeed sort out the problem...

Running 'apt-get install -f' did nothing - I had actually typed quite a long report about the fact that I'd founf strange version numbers, after trying that, when using the Synaptic Package Manager.... when I tried to post it showed me you two comments instead.

I had forgotten that I had added an external PPA for postgresql: I needed functionality on a course that I was taking that wasn't available in the Ubuntu version.

Revision history for this message
Geoff Riley (geoffr) said :
#5

Thanks actionparsnip, that solved my question.

Revision history for this message
Peter Coach (ps-calado) said :
#6

Hi,

Here is my contribution:

When I tried update my Ubuntu, I received this message:

The following packages have unmet dependencies:

postgresql-client-9.1: Depends: zlib1g (>= 1:1.2.3.3.dfsg) but 1:1.2.3.4.dfsg-3ubuntu4 is installed
                       Depends: postgresql-client-common (>= 115~) but 129ubuntu1 is installed

Then I follow the Andrew's instructions:

~$ ll /var/cache/apt/archives/postgresql*
-rw-r--r-- 1 root root 5552 Sep 8 00:33 /var/cache/apt/archives/postgresql_9.1+129ubuntu1_all.deb
-rw-r--r-- 1 root root 4308968 Sep 25 07:34 /var/cache/apt/archives/postgresql-9.1_9.1.6-0ubuntu12.04_i386.deb
-rw-r--r-- 1 root root 961724 Sep 25 07:34 /var/cache/apt/archives/postgresql-client-9.1_9.1.6-0ubuntu12.04_i386.deb
-rw-r--r-- 1 root root 25102 Sep 8 00:33 /var/cache/apt/archives/postgresql-client-common_129ubuntu1_all.deb
-rw-r--r-- 1 root root 96452 Sep 8 00:33 /var/cache/apt/archives/postgresql-common_129ubuntu1_all.deb
~$ sudo dpkg --force-all -i /var/cache/apt/archives/postgresql-9.1_9.1.6-0ubuntu12.04_i386.deb
[sudo] password :
(Reading database ... 513869 files and directories currently installed.)
Preparing to replace postgresql-9.1 9.1.5-0ubuntu12.04 (using .../postgresql-9.1_9.1.6-0ubuntu12.04_i386.deb) ...
 * Stopping PostgreSQL 9.1 database server [ OK ]
Unpacking replacement postgresql-9.1 ...
Setting up postgresql-9.1 (9.1.6-0ubuntu12.04) ...
 * Starting PostgreSQL 9.1 database server [ OK ]
~$ sudo apt-get -f install
Reading package lists... Done
Building dependency tree
Reading state information... Done
0 upgraded, 0 newly installed, 0 to remove and 54 not upgraded.
1 not fully installed or removed.
After this operation, 0 B of additional disk space will be used.
Setting up postgresql (9.1+129ubuntu1) ...

After that I could update my Ubuntu. Now everything is working perfectly.

Best regards,
Ascenso