The installation of postgresql server in Ubuntu 12.04 fails. Its seem to be due to incomplete configuration of postgresql-common package. I purged all packages related to postgresql, tried to reinstall postgresql-common package only. Still error was occuring.
The error is:
$ sudo apt-get install postgresql-common
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following NEW packages will be installed:
postgresql-common
0 upgraded, 1 newly installed, 0 to remove and 0 not upgraded.
Need to get 0 B/96.5 kB of archives.
After this operation, 442 kB of additional disk space will be used.
Preconfiguring packages ...
Selecting previously unselected package postgresql-common.
(Reading database ... 176855 files and directories currently installed.)
Unpacking postgresql-common (from .../postgresql-common_129ubuntu1_all.deb) ...
Adding 'diversion of /usr/bin/pg_config to /usr/bin/pg_config.libpq-dev by postgresql-common'
Processing triggers for ureadahead ...
Processing triggers for man-db ...
Setting up postgresql-common (129ubuntu1) ...
adduser: The user `postgres' does not exist.
dpkg: error processing postgresql-common (--configure):
subprocess installed post-installation script returned error exit status 1
Errors were encountered while processing:
postgresql-common
E: Sub-process /usr/bin/dpkg returned an error code (1)
Any idea how to overcome/solve this?
N.B:
- I updated and tried again, same error is occuring.
- I purged the postgresql related packages and tried to install both
postgresql-8.4
andpostgresql-9.1
, in both cases, it failed due to the dependency topostgresql-common
package.