package postgresql-9.5 9.5.14-0ubuntu0.16.04 failed to install/upgrade: subprocess new pre-removal script returned error exit status 2 and don't let me use apt-get anymore

Bug #1834230 reported by Arthur Escriou
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
postgresql-9.5 (Ubuntu)
Expired
Undecided
Unassigned

Bug Description

package postgresql-9.5 9.5.14-0ubuntu0.16.04 failed to install/upgrade: subprocess new pre-removal script returned error exit status 2 and don't let me use apt-get anymore

ProblemType: Package
DistroRelease: Ubuntu 16.04
Package: postgresql-9.5 9.5.14-0ubuntu0.16.04
ProcVersionSignature: Ubuntu 4.15.0-48.51~16.04.1-generic 4.15.18
Uname: Linux 4.15.0-48-generic x86_64
ApportVersion: 2.20.1-0ubuntu2.18
Architecture: amd64
Date: Tue Jun 25 19:42:26 2019
DpkgHistoryLog:
 Start-Date: 2019-06-25 19:42:25
 Commandline: apt-get install -f
 Requested-By: arthur (1000)
 Upgrade: postgresql-9.5:amd64 (9.5.14-0ubuntu0.16.04, 9.5.17-0ubuntu0.16.04.1)
ErrorMessage: subprocess new pre-removal script returned error exit status 2
InstallationDate: Installed on 2017-11-11 (591 days ago)
InstallationMedia: Ubuntu 16.04.3 LTS "Xenial Xerus" - Release amd64 (20170801)
RelatedPackageVersions:
 dpkg 1.18.4ubuntu1.5
 apt 1.2.31
SourcePackage: postgresql-9.5
Title: package postgresql-9.5 9.5.14-0ubuntu0.16.04 failed to install/upgrade: subprocess new pre-removal script returned error exit status 2
UpgradeStatus: Upgraded to xenial on 2018-09-17 (280 days ago)

Revision history for this message
Arthur Escriou (aescriou) wrote :
tags: removed: need-duplicate-check
Revision history for this message
Christian Ehrhardt  (paelzer) wrote :

Hi,
this kind of issue is often triggered by using packages from outside the Ubuntu archive.
The file you are missing is of package postgresql-client-common which is installed as dependency.

You can double check via:
root@x:~# dpkg -S /usr/share/postgresql-common/maintscripts-functions
postgresql-client-common: /usr/share/postgresql-common/maintscripts-functions
root@x:~# dpkg --verify postgresql-client-common
root@x:~# apt-cache policy postgresql-client-common
postgresql-client-common:
  Installed: 173ubuntu0.3
  Candidate: 173ubuntu0.3
  Version table:
 *** 173ubuntu0.3 500
        500 http://archive.ubuntu.com/ubuntu xenial-updates/main amd64 Packages
        500 http://security.ubuntu.com/ubuntu xenial-security/main amd64 Packages
        100 /var/lib/dpkg/status
     173 500
        500 http://archive.ubuntu.com/ubuntu xenial/main amd64 Packages

And report that back here.

If you happen to have an external postgresql-common please rest back to the one matching postgresql-9.5 from the archvie then things should work again.

If you happened to remove the file by accident a re-install of the package helps:
$ apt install --reinstall postgresql-common

Changed in postgresql-9.5 (Ubuntu):
status: New → Incomplete
Revision history for this message
Christian Ehrhardt  (paelzer) wrote :

Thank you for taking the time to report this bug and helping to make Ubuntu better.

Since it seems likely to me that this is a local configuration problem, rather than a bug in Ubuntu, I'm marking this bug as Incomplete.

If indeed this is a local configuration problem, you can find pointers to get help for this sort of problem here: http://www.ubuntu.com/support/community

Or if you believe that this is really a bug, then you may find it helpful to read "How to report bugs effectively" http://www.chiark.greenend.org.uk/~sgtatham/bugs.html. We'd be grateful if you would then provide a more complete description of the problem, explain why you believe this is a bug in Ubuntu rather than a problem specific to your system, and then change the bug status back to New.

Revision history for this message
Launchpad Janitor (janitor) wrote :

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

Changed in postgresql-9.5 (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.