package postgresql-8.4 8.4.2-0ubuntu9.10 failed to install/upgrade: subprocess installed post-installation script returned error exit status 1

Bug #525016 reported by alex-mobigo
54
This bug affects 12 people
Affects Status Importance Assigned to Milestone
postgresql-8.4 (Ubuntu)
New
Undecided
Unassigned

Bug Description

Binary package hint: postgresql-8.4

This is a fresh new ubuntu 9.10 install
I installed postgresql-8.4.2 and pgadmin3 from source code (not patched), it was installed and running fine.
Since i dont have enough knowledge i could not create the script to start postgresql on startup, so i uninstalled pgadmin3 and postgresql8.4.2 and deleted the postgres user i created manually and did a install using apt-get install postgresql.

Here is the output:

sudo apt-get install postgresql
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following extra packages will be installed:
  libreadline5 postgresql-8.4 postgresql-client-8.4 postgresql-client-common
  postgresql-common
Suggested packages:
  oidentd ident-server postgresql-doc-8.4
The following NEW packages will be installed:
  libreadline5 postgresql postgresql-8.4 postgresql-client-8.4
  postgresql-client-common postgresql-common
0 upgraded, 6 newly installed, 0 to remove and 0 not upgraded.
Need to get 5,164kB of archives.
After this operation, 18.8MB of additional disk space will be used.
Do you want to continue [Y/n]? y
Get:1 http://br.archive.ubuntu.com karmic/main libreadline5 5.2-6 [147kB]
Get:2 http://br.archive.ubuntu.com karmic/main postgresql-client-common 101 [49.8kB]
Get:3 http://br.archive.ubuntu.com karmic-updates/main postgresql-client-8.4 8.4.2-0ubuntu9.10 [828kB]
Get:4 http://br.archive.ubuntu.com karmic/main postgresql-common 101 [85.6kB]
Get:5 http://br.archive.ubuntu.com karmic-updates/main postgresql-8.4 8.4.2-0ubuntu9.10 [4,043kB]
Get:6 http://br.archive.ubuntu.com karmic-updates/main postgresql 8.4.2-0ubuntu9.10 [10.2kB]
Fetched 5,164kB in 23s (216kB/s)
Preconfiguring packages ...
Selecting previously deselected package libreadline5.
(Reading database ... 151057 files and directories currently installed.)
Unpacking libreadline5 (from .../libreadline5_5.2-6_amd64.deb) ...
Selecting previously deselected package postgresql-client-common.
Unpacking postgresql-client-common (from .../postgresql-client-common_101_all.deb) ...
Selecting previously deselected package postgresql-client-8.4.
Unpacking postgresql-client-8.4 (from .../postgresql-client-8.4_8.4.2-0ubuntu9.10_amd64.deb) ...
Selecting previously deselected package postgresql-common.
Unpacking postgresql-common (from .../postgresql-common_101_all.deb) ...
Selecting previously deselected package postgresql-8.4.
Unpacking postgresql-8.4 (from .../postgresql-8.4_8.4.2-0ubuntu9.10_amd64.deb) ...
Selecting previously deselected package postgresql.
Unpacking postgresql (from .../postgresql_8.4.2-0ubuntu9.10_all.deb) ...
Processing triggers for man-db ...
Processing triggers for ureadahead ...
Setting up libreadline5 (5.2-6) ...

Setting up postgresql-client-common (101) ...
Setting up postgresql-client-8.4 (8.4.2-0ubuntu9.10) ...
update-alternatives: using /usr/share/postgresql/8.4/man/man1/psql.1.gz to provide /usr/share/man/man1/psql.1.gz (psql.1.gz) in auto mode.

Setting up postgresql-common (101) ...
Adding user postgres to group ssl-cert
Building PostgreSQL dictionaries from installed myspell/hunspell packages...
  en_au
  en_gb
  en_us
  en_za

Setting up postgresql-8.4 (8.4.2-0ubuntu9.10) ...
Creating new cluster (configuration: /etc/postgresql/8.4/main, data: /var/lib/postgresql/8.4/main)...
Moving configuration file /var/lib/postgresql/8.4/main/postgresql.conf to /etc/postgresql/8.4/main...
Moving configuration file /var/lib/postgresql/8.4/main/pg_hba.conf to /etc/postgresql/8.4/main...
Moving configuration file /var/lib/postgresql/8.4/main/pg_ident.conf to /etc/postgresql/8.4/main...
Configuring postgresql.conf to use port 5432...
update-alternatives: using /usr/share/postgresql/8.4/man/man1/postmaster.1.gz to provide /usr/share/man/man1/postmaster.1.gz (postmaster.1.gz) in auto mode.
 * Starting PostgreSQL 8.4 database server
 * Error: could not exec /usr/lib/postgresql/8.4/bin/pg_ctl /usr/lib/postgresql/8.4/bin/pg_ctl start -D /var/lib/postgresql/8.4/main -l /var/log/postgresql/postgresql-8.4-main.log -s -o -c config_file="/etc/postgresql/8.4/main/postgresql.conf" :
 [fail]
invoke-rc.d: initscript postgresql-8.4, action "start" failed.
dpkg: error processing postgresql-8.4 (--configure):
 subprocess installed post-installation script returned error exit status 1
dpkg: dependency problems prevent configuration of postgresql:
 postgresql depends on postgresql-8.4; however:
  Package postgresql-8.4 is not configured yet.
dpkg: error processing postgresql (--configure):
 dependency problems - leaving unconfigured
Processing triggers for libc-bin ...
ldconfig deferred processing now taking place
No apport report written because the error message indicates its a followup error from a previous failure.
                          Errors were encountered while processing:
 postgresql-8.4
 postgresql
E: Sub-process /usr/bin/dpkg returned an error code (1)

Is any work around to clean it up and try a new install?

ProblemType: Package
Architecture: amd64
Date: Sat Feb 20 17:28:22 2010
DistroRelease: Ubuntu 9.10
ErrorMessage: subprocess installed post-installation script returned error exit status 1
InstallationMedia: Ubuntu 9.10 "Karmic Koala" - Release amd64 (20091027)
Package: postgresql-8.4 8.4.2-0ubuntu9.10
ProcVersionSignature: Ubuntu 2.6.31-19.56-generic
SourcePackage: postgresql-8.4
Title: package postgresql-8.4 8.4.2-0ubuntu9.10 failed to install/upgrade: subprocess installed post-installation script returned error exit status 1
Uname: Linux 2.6.31-19-generic x86_64

Revision history for this message
alex-mobigo (alex-mobigo) wrote :
Revision history for this message
alex-mobigo (alex-mobigo) wrote :

additional info:
Installed the first time with -D /db/pgsql and deleted the directory before apt-get install postgresql

Revision history for this message
alex-mobigo (alex-mobigo) wrote :

it is apt-get bug!

No matter what i try to uninstall or remove or purge with apt-get, i get the same 10.2 deb download.

sudo apt-get purge postgresql
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following packages will be REMOVED:
  postgresql*
0 upgraded, 0 newly installed, 1 to remove and 0 not upgraded.
After this operation, 45.1kB disk space will be freed.
Do you want to continue [Y/n]? y
(Reading database ... 151432 files and directories currently installed.)
Removing postgresql ...

Then:
sudo apt-get -f install postgresql
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following NEW packages will be installed:
  postgresql
0 upgraded, 1 newly installed, 0 to remove and 0 not upgraded.
Need to get 0B/10.2kB of archives.
After this operation, 45.1kB of additional disk space will be used.
Selecting previously deselected package postgresql.
(Reading database ... 151429 files and directories currently installed.)
Unpacking postgresql (from .../postgresql_8.4.2-0ubuntu9.10_all.deb) ...
Setting up postgresql (8.4.2-0ubuntu9.10) ...

And then...
sudo apt-get check postgresql
Reading package lists... Done
Building dependency tree
Reading state information... Done

I deleted all files manually:
sudo rm /etc/init.d/postgresql-8.4
sudo rm /etc/logrotate.d/postgresql-common
sudo rm -R /usr/share/doc/postgresql-common
sudo rm -R /usr/lib/postgresql
sudo rm -R /var/lib/postgresql
sudo rm -R /usr/share/doc/postgresql-client-8.4
sudo rm -R /usr/share/postgresql
sudo rm -R /usr/share/postgresql-common
sudo rm -R /etc/postgresql-common
sudo rm /usr/share/man/man7/postgresql-common.7.gz
sudo rm /usr/bin/vacuumlo
sudo rm /usr/bin/vacuumdb
sudo rm /usr/bin/reindexdb
sudo rm /usr/bin/psql
sudo rm /usr/bin/pg_restore
sudo rm /usr/bin/pg_dumpall
sudo rm /usr/bin/pg_dump
sudo rm /usr/bin/dropuser
sudo rm /usr/bin/droplang
sudo rm /usr/bin/dropdb
sudo rm /usr/bin/createuser
sudo rm /usr/bin/createlang
sudo rm /usr/bin/createdb
sudo rm /usr/bin/clusterdb
sudo rm /usr/bin/pg_lsclusters
sudo rm /usr/bin/pg_createcluster
sudo rm /usr/bin/pg_dropcluster
sudo rm /usr/bin/pg_ctlcluster
sudo rm /usr/bin/pg_upgradecluster
sudo rm /usr/sbin/pg_updatedicts

How can i force apt-get to download and install the packages again?
Is any way to clean the cache?

regards
alex

Revision history for this message
alex-mobigo (alex-mobigo) wrote :
Download full text (4.6 KiB)

ok, i cleaned it up and made a new install.
apt-get refuses to install libpq.so.

alex@srv:~$ /usr/lib/postgresql/8.4/bin/pg_ctl start -D /var/lib/postgresql/8.4/main -l /var/log/postgresql/postgresql-8.4-main.log -s -o -c config_file="/etc/postgresql/8.4/main/postgresql.conf"
/usr/lib/postgresql/8.4/bin/pg_ctl: error while loading shared libraries: libpq.so.5: cannot open shared object file: No such file or directory

alex@srv:~$ sudo find / -name libpq*
/usr/share/doc/libpq5
/usr/include/libpq

Does anyone have this issue with a new postgresql 8.4 install?
Who should install libpq5?

See the complete log:

alex@srv:~$ sudo apt-get install postgresql
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following extra packages will be installed:
  postgresql-8.4 postgresql-client-8.4 postgresql-common
Suggested packages:
  oidentd ident-server postgresql-doc-8.4
The following NEW packages will be installed:
  postgresql postgresql-8.4 postgresql-client-8.4 postgresql-common
0 upgraded, 4 newly installed, 0 to remove and 0 not upgraded.
Need to get 4,967kB of archives.
After this operation, 18.2MB of additional disk space will be used.
Do you want to continue [Y/n]? y
Get:1 http://br.archive.ubuntu.com karmic-updates/main postgresql-client-8.4 8.4.2-0ubuntu9.10 [828kB]
Get:2 http://br.archive.ubuntu.com karmic/main postgresql-common 101 [85.6kB]
Get:3 http://br.archive.ubuntu.com karmic-updates/main postgresql-8.4 8.4.2-0ubuntu9.10 [4,043kB]
Get:4 http://br.archive.ubuntu.com karmic-updates/main postgresql 8.4.2-0ubuntu9.10 [10.2kB]
Fetched 4,967kB in 23s (216kB/s)
Preconfiguring packages ...
Selecting previously deselected package postgresql-client-8.4.
(Reading database ...
dpkg: warning: files list file for package `libpq5' missing, assuming package has no files currently installed.
(Reading database ... 151106 files and directories currently installed.)
Unpacking postgresql-client-8.4 (from .../postgresql-client-8.4_8.4.2-0ubuntu9.10_amd64.deb) ...
Selecting previously deselected package postgresql-common.
Unpacking postgresql-common (from .../postgresql-common_101_all.deb) ...
Selecting previously deselected package postgresql-8.4.
Unpacking postgresql-8.4 (from .../postgresql-8.4_8.4.2-0ubuntu9.10_amd64.deb) ...
Selecting previously deselected package postgresql.
Unpacking postgresql (from .../postgresql_8.4.2-0ubuntu9.10_all.deb) ...
Processing triggers for man-db ...
Processing triggers for ureadahead ...
Setting up postgresql-client-8.4 (8.4.2-0ubuntu9.10) ...
update-alternatives: using /usr/share/postgresql/8.4/man/man1/psql.1.gz to provide /usr/share/man/man1/psql.1.gz (psql.1.gz) in auto mode.

Setting up postgresql-common (101) ...
Building PostgreSQL dictionaries from installed myspell/hunspell packages...
  en_au
  en_gb
  en_us
  en_za

Setting up postgresql-8.4 (8.4.2-0ubuntu9.10) ...
Creating new cluster (configuration: /etc/postgresql/8.4/main, data: /var/lib/postgresql/8.4/main)...
Moving configuration file /var/lib/postgresql/8.4/main/postgresql.conf to /etc/postgresql/8.4/main...
Moving configuration file /var/lib/postgresql/8...

Read more...

Revision history for this message
Peter Dietz (pdietz84) wrote :

To try to fix up postgres, I marked it for complete removal, yet it left artifacts, such as:
/etc/init.d/postgres/8.4

So I deleted that manually. Upon re-installing postgres, it doesn't recreate this file. I would say this is a surprising behavior of the terms "complete removal" and reinstall.

Revision history for this message
alex-mobigo (alex-mobigo) wrote :

It is really confusing..
In order to have Postgresql 8.4 running i installed from source in /usr to have libpq5 installed.

After a lot of install and removal with apt-get (all the way..) i ended up with both the ubuntu Postgresql installed and my Postgresql compilation installed in /usr. I cannot recall how many times and how i managed to re-install it.

It is running and i dont know which one really is runnig.
I think postgresql-client-8.4 does not install lippq5 and this comes with the ubuntu 9.10 instalation, also apt-get remove does not really clean up the /etc/init.d/postgres/8.4 and apt-get refuses to do a new install downloading only 10.2 kb of .deb

Does it make sense?

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.