[Pkg-postgresql-public] Bug#678858: postgresql-8.4: install fails on ipv6-only system

Christoph Berg myon at debian.org
Sun Jul 8 17:57:31 UTC 2012


> Setting up postgresql-8.4 (8.4.11-0squeeze1) ...
> could not create socket: Protocol not supported at /usr/share/postgresql-common/PgCommon.pm line 591.
> Error: could not create default cluster. Please create it manually with

Hi Erwin, thanks for the report.

Could you try if the following patch fixes the problem?

--- PgCommon.pm	2012-04-10 09:19:24 +0000
+++ PgCommon.pm	2012-07-08 17:53:26 +0000
@@ -675,6 +675,7 @@
 
         # check if port is already in use
         socket (SOCK, PF_INET, SOCK_STREAM, getprotobyname('tcp')) or 
+        socket (SOCK, PF_INET6, SOCK_STREAM, getprotobyname('tcp')) or
             die "could not create socket: $!";
         my $res = bind (SOCK, sockaddr_in($port, INADDR_ANY));
         close SOCK;

I can't really test it here because the Debian (linux) kernels have
ipv4 compiled in.

PostgreSQL itself should work fine, I'd hope, but please check that
too. There should be some UDP connection open:

$ LC_ALL=C sudo netstat -upn
Active Internet connections (w/o servers)
Proto Recv-Q Send-Q Local Address           Foreign Address         State       PID/Program name
udp6       0      0 ::1:35830               ::1:35830               ESTABLISHED 17357/postgres  

Christoph
-- 
cb at df7cb.de | http://www.df7cb.de/
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 836 bytes
Desc: Digital signature
URL: <http://lists.alioth.debian.org/pipermail/pkg-postgresql-public/attachments/20120708/04ea19b0/attachment.pgp>


More information about the Pkg-postgresql-public mailing list