postgresql-8.2: subprocess post-installation script returned error exit status 1

Asked by aditya on 2008-05-31

i use edubuntu 7.10
i installed a new copy of edubuntu today morning as soon as i got the following error:::

E: postgresql-8.2: subprocess post-installation script returned error exit status 1
E: postgresql: dependency problems - leaving unconfigured

After installing all the updates, i installed apache,php & postgresql
still i am getting the same problem. PLUS the question #34783. I am getting these errors after updating the system
Help will be appreciated!!!

Question information

Language:
English Edit question
Status:
Solved
For:
Ubuntu postgresql Edit question
Assignee:
No assignee Edit question
Solved by:
aditya
Solved:
2008-05-31
Last query:
2008-05-31
Last reply:
2008-05-31
Tony Mugan (tmugan) said : #1

Try in a terminal window (Applications, Accessories menu)

sudo dpkg --configure -a

It may give you the opportunity to reconfigure the packages that did not complete configuration correctly

aditya (adityagada) said : #2

NOT successful with " sudo dpkg --configure -a "

aditya@edubuntu:~$ sudo dpkg --configure -a
Setting up postgresql-8.2 (8.2.7-0ubuntu0.7.10) ...
 * Starting PostgreSQL 8.2 database server * The PostgreSQL server failed to start. Please check the log output:
2008-05-31 17:22:20 IST LOG: could not load root certificate file "root.crt": no SSL error reported
2008-05-31 17:22:20 IST DETAIL: Will not verify client certificates.
2008-05-31 17:22:20 IST LOG: could not translate host name "localhost", service "5432" to address: Name or service not known
2008-05-31 17:22:20 IST WARNING: could not create listen socket for "localhost"
2008-05-31 17:22:20 IST FATAL: could not create any TCP/IP sockets
                                                                         [fail]
invoke-rc.d: initscript postgresql-8.2, action "start" failed.
dpkg: error processing postgresql-8.2 (--configure):
 subprocess post-installation script returned error exit status 1
dpkg: dependency problems prevent configuration of postgresql:
 postgresql depends on postgresql-8.2; however:
  Package postgresql-8.2 is not configured yet.
dpkg: error processing postgresql (--configure):
 dependency problems - leaving unconfigured
Errors were encountered while processing:
 postgresql-8.2
 postgresql
aditya@edubuntu:~$

Tony Mugan (tmugan) said : #3

Ok try this for the dependencies of postgres

sud apt-get install libc6 libcomerr2 libkrb53 libpam0g libpq5 libssl0.9.8 postgresql-client-8.2 postgresql-common tzdata

and if anything new installs try the dpkg --configure -a line again

Tony Mugan (tmugan) said : #4

Woops, should have been sudo

sudo apt-get install libc6 libcomerr2 libkrb53 libpam0g libpq5 libssl0.9.8 postgresql-client-8.2 postgresql-common tzdata

Tony Mugan (tmugan) said : #5

Actually, forget that, I gave you the Ubuntu 8.04 dependencies for postgres, Sorry!!

:(

Tony Mugan (tmugan) said : #6

Let's try that again.

Can you run Synaptic and look in the task bar at the bottom of the synaptic window?
Does it mention how many broken packages there are?
If it is greater than zero, try the Edit menu and fix broken packages.

aditya (adityagada) said : #7

Thanks a zillion for your prompt replies....
There are no broken packages.

Getting these errors now ::::::

aditya@edubuntu:~$ sudo apt-get install libc6 libcomerr2 libkrb53 libpam0g libpq5
[sudo] password for aditya:
Reading package lists... Done
Building dependency tree
Reading state information... Done
libc6 is already the newest version.
libcomerr2 is already the newest version.
libkrb53 is already the newest version.
libpam0g is already the newest version.
libpq5 is already the newest version.
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
2 not fully installed or removed.
Need to get 0B of archives.
After unpacking 0B of additional disk space will be used.
Setting up postgresql-8.2 (8.2.7-0ubuntu0.7.10) ...
 * Starting PostgreSQL 8.2 database server * The PostgreSQL server failed to start. Please check the log output:
2008-05-31 17:56:59 IST LOG: could not load root certificate file "root.crt": no SSL error reported
2008-05-31 17:56:59 IST DETAIL: Will not verify client certificates.
2008-05-31 17:57:00 IST LOG: could not translate host name "localhost", service "5432" to address: Name or service not known
2008-05-31 17:57:00 IST WARNING: could not create listen socket for "localhost"
2008-05-31 17:57:00 IST FATAL: could not create any TCP/IP sockets
                                                                                                                                                      [fail]
invoke-rc.d: initscript postgresql-8.2, action "start" failed.
dpkg: error processing postgresql-8.2 (--configure):
 subprocess post-installation script returned error exit status 1
dpkg: dependency problems prevent configuration of postgresql:
 postgresql depends on postgresql-8.2; however:
  Package postgresql-8.2 is not configured yet.
dpkg: error processing postgresql (--configure):
 dependency problems - leaving unconfigured
Errors were encountered while processing:
 postgresql-8.2
 postgresql
E: Sub-process /usr/bin/dpkg returned an error code (1)
aditya@edubuntu:~$

Tony Mugan (tmugan) said : #8

Hmm, what do you get if you try

ping localhost

ping 127.0.0.1

aditya (adityagada) said : #9

aditya@edubuntu:~$ ping localhost
ping: unknown host localhost
aditya@edubuntu:~$ ping 127.0.0.1
PING 127.0.0.1 (127.0.0.1) 56(84) bytes of data.
64 bytes from 127.0.0.1: icmp_seq=1 ttl=64 time=0.044 ms
64 bytes from 127.0.0.1: icmp_seq=2 ttl=64 time=0.047 ms
64 bytes from 127.0.0.1: icmp_seq=3 ttl=64 time=0.042 ms
64 bytes from 127.0.0.1: icmp_seq=4 ttl=64 time=0.043 ms
64 bytes from 127.0.0.1: icmp_seq=5 ttl=64 time=0.032 ms
64 bytes from 127.0.0.1: icmp_seq=6 ttl=64 time=0.044 ms
64 bytes from 127.0.0.1: icmp_seq=7 ttl=64 time=0.043 ms

aditya (adityagada) said : #10

thank you soo much...

^[[Aaditya@edubuntu:~$ ping 127.0.0.1
PING 127.0.0.1 (127.0.0.1) 56(84) bytes of data.
64 bytes from 127.0.0.1: icmp_seq=1 ttl=64 time=0.043 ms
64 bytes from 127.0.0.1: icmp_seq=2 ttl=64 time=0.031 ms
64 bytes from 127.0.0.1: icmp_seq=3 ttl=64 time=0.029 ms

[1]+ Stopped ping 127.0.0.1
aditya@edubuntu:~$ ping localhost
PING localhost (127.0.0.1) 56(84) bytes of data.
64 bytes from localhost (127.0.0.1): icmp_seq=1 ttl=64 time=0.036 ms
64 bytes from localhost (127.0.0.1): icmp_seq=2 ttl=64 time=0.030 ms
64 bytes from localhost (127.0.0.1): icmp_seq=3 ttl=64 time=0.031 ms

[2]+ Stopped ping localhost
aditya@edubuntu:~$ sudo dpkg --configure -a[sudo] password for aditya:
Setting up postgresql-8.2 (8.2.7-0ubuntu0.7.10) ...
 * Starting PostgreSQL 8.2 database server [ OK ]

Setting up postgresql (8.2.7-0ubuntu0.7.10) ...

aditya (adityagada) said : #11

Thank you so much......god bless you!!!!!!

grosser (grosser-michael) said : #12

did not work for me, even though localhost is resolvable,
I changed address in /etc/postgresql/8.4/main/postgresql.conf to 127.0.0.1