package postgresql-8.4 8.4.16-0ubuntu12.04 failed to install/upgrade: subprocess installed pre-removal script returned error exit status 1

Bug #1242473 reported by Murali Adari
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
postgresql-8.4 (Ubuntu)
New
Undecided
Unassigned

Bug Description

I am trying to uninstall postgrsql along with its other dependedent packages by running the following command:
sudo apt-get --purge remove postgresql-8.4 postgresql-client-8.4 postgresql-client-common postgresql-common

But get the below error:
Reading state information... Done
The following packages will be REMOVED:
  postgresql-8.4* postgresql-client-8.4* postgresql-client-common* postgresql-common*
0 upgraded, 0 newly installed, 4 to remove and 0 not upgraded.
3 not fully installed or removed.
After this operation, 20.8 MB disk space will be freed.
Do you want to continue [Y/n]? y
(Reading database ... 270860 files and directories currently installed.)
Removing postgresql-8.4 ...
/var/lib/dpkg/info/postgresql-8.4.prerm: line 7: /usr/share/postgresql-common/maintscripts-functions: No such file or directory
dpkg: error processing postgresql-8.4 (--purge):
 subprocess installed pre-removal script returned error exit status 1
Removing postgresql-client-common ...
Purging configuration files for postgresql-client-common ...
dpkg: postgresql-common: dependency problems, but removing anyway as you requested:
 postgresql-8.4 depends on postgresql-common (>= 129~); however:
  Package postgresql-common is to be removed.
Removing postgresql-common ...
 * Stopping PostgreSQL 8.4 database server [ OK ]
Removing 'diversion of /usr/bin/pg_config to /usr/bin/pg_config.libpq-dev by postgresql-common'
Purging configuration files for postgresql-common ...
dpkg: warning: while removing postgresql-common, directory '/var/lib/postgresql' not empty so not removed.
dpkg: postgresql-client-8.4: dependency problems, but removing anyway as you requested:
 postgresql-8.4 depends on postgresql-client-8.4; however:
  Package postgresql-client-8.4 is to be removed.
Removing postgresql-client-8.4 ...
/var/lib/dpkg/info/postgresql-client-8.4.prerm: line 8: /usr/share/postgresql-common/maintscripts-functions: No such file or directory
dpkg: error processing postgresql-client-8.4 (--purge):
 subprocess installed pre-removal script returned error exit status 1
/var/lib/dpkg/info/postgresql-client-8.4.postinst: line 5: /usr/share/postgresql-common/maintscripts-functions: No such file or directory
dpkg: error while cleaning up:
 subprocess installed post-installation script returned error exit status 1
Processing triggers for man-db ...
Processing triggers for ureadahead ...
ureadahead will be reprofiled on next reboot
Errors were encountered while processing:
 postgresql-8.4
 postgresql-client-8.4
E: Sub-process /usr/bin/dpkg returned an error code (1)

I have a bunch of postgreSQL updates showing up in the update manager , however when I click on Install Updates, the Update Manager also fails. So here I am stuck unable to update or uninstall.

ProblemType: Package
DistroRelease: Ubuntu 12.04
Package: postgresql-8.4 8.4.16-0ubuntu12.04
ProcVersionSignature: Ubuntu 3.5.0-41.64~precise1-generic 3.5.7.21
Uname: Linux 3.5.0-41-generic x86_64
ApportVersion: 2.0.1-0ubuntu17.5
AptOrdering:
 postgresql-8.4: Purge
 postgresql-client-8.4: Purge
 postgresql-common: Purge
 postgresql-client-common: Purge
 hbase: Configure
Architecture: amd64
Date: Sun Oct 20 19:38:08 2013
DpkgTerminalLog:
 Removing postgresql-8.4 ...
 /var/lib/dpkg/info/postgresql-8.4.prerm: line 7: /usr/share/postgresql-common/maintscripts-functions: No such file or directory
 dpkg: error processing postgresql-8.4 (--purge):
  subprocess installed pre-removal script returned error exit status 1
DuplicateSignature: package:postgresql-8.4:8.4.16-0ubuntu12.04:subprocess installed pre-removal script returned error exit status 1
ErrorMessage: subprocess installed pre-removal script returned error exit status 1
InstallationMedia: Ubuntu 12.04.2 LTS "Precise Pangolin" - Release amd64 (20130214)
MarkForUpload: True
SourcePackage: postgresql-8.4
Title: package postgresql-8.4 8.4.16-0ubuntu12.04 failed to install/upgrade: subprocess installed pre-removal script returned error exit status 1
UpgradeStatus: No upgrade log present (probably fresh install)

Revision history for this message
Murali Adari (murali-adari) wrote :
tags: removed: need-duplicate-check
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.