package postgresql-contrib-9.6 9.6.3-0ubuntu0.17.04 failed to install/upgrade: subprocess installed pre-removal script returned error exit status 2

Bug #1697675 reported by Ibukunoluwa Dairo
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
postgresql-9.6 (Ubuntu)
Expired
Undecided
Unassigned

Bug Description

Crashes

ProblemType: Package
DistroRelease: Ubuntu 17.04
Package: postgresql-contrib-9.6 9.6.3-0ubuntu0.17.04
ProcVersionSignature: Ubuntu 4.10.0-22.24-generic 4.10.15
Uname: Linux 4.10.0-22-generic x86_64
ApportVersion: 2.20.4-0ubuntu4.1
Architecture: amd64
Date: Mon Jun 12 14:42:21 2017
DpkgTerminalLog:
 Removing postgresql-contrib-9.6 (9.6.3-0ubuntu0.17.04) ...
 update-alternatives: error: alternative path /usr/share/postgresql/9.6/man/man1/postmaster.1.gz doesn't exist
 dpkg: error processing package postgresql-contrib-9.6 (--remove):
  subprocess installed pre-removal script returned error exit status 2
ErrorMessage: subprocess installed pre-removal script returned error exit status 2
InstallationDate: Installed on 2017-05-06 (37 days ago)
InstallationMedia: Ubuntu 17.04 "Zesty Zapus" - Release amd64 (20170412)
RelatedPackageVersions:
 dpkg 1.18.10ubuntu2
 apt 1.4
SourcePackage: postgresql-9.6
Title: package postgresql-contrib-9.6 9.6.3-0ubuntu0.17.04 failed to install/upgrade: subprocess installed pre-removal script returned error exit status 2
UpgradeStatus: No upgrade log present (probably fresh install)

Revision history for this message
Ibukunoluwa Dairo (hibeekaey) wrote :
Revision history for this message
Christian Ehrhardt  (paelzer) wrote :

Hi,
thank you for your report and your help to make Ubuntu better.

I tried to recreate:
$ apt install postgresql
$ dpkg -S /usr/share/postgresql/9.6/man/man1/postmaster.1.gz
  postgresql-9.6: /usr/share/postgresql/9.6/man/man1/postmaster.1.gz
$ apt remove postgresql

And I see:
Removing postgresql-contrib-9.6 (9.6.3-0ubuntu0.17.04) ...
update-alternatives: warning: forcing reinstallation of alternative /usr/share/postgresql/9.6/man/man1/postmaster.1.gz because link group postmaster.1.gz is broken

So both our cases have that file missing, yet in my repro-case dpkg detects that and removes it correctly.

The file itself is a very old compat name:
update-alternatives: using /usr/share/postgresql/9.6/man/man1/postmaster.1.gz to provide /usr/share/man/man1/postmaster.1.gz (postmaster.1.gz) in auto mode
Quoting from that:
"postmaster is a deprecated alias of postgres."

So in your case something seems to break that - but I can't see from the logs what :-/
Could you report back what the following shows you:
$ dpkg -S /usr/share/postgresql/9.6/man/man1/postmaster.1*
$ ls -laF /usr/share/postgresql/9.6/man/man1/postmaster.1*

Maybe we find some sort of half installed or half removed file that causes this.
Other than that I wanted to ask if you have any sort of third party packages installed that could cause this?

Changed in postgresql-9.6 (Ubuntu):
status: New → Incomplete
Revision history for this message
Launchpad Janitor (janitor) wrote :

[Expired for postgresql-9.6 (Ubuntu) because there has been no activity for 60 days.]

Changed in postgresql-9.6 (Ubuntu):
status: Incomplete → Expired
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.