5

When I put postgres -D /usr/local/var/postgres in terminal I get this back:

LOG: could not translate host name "localhost", service "5432" to address: nodename nor servname provided, or not known
WARNING: could not create listen socket for "localhost"
FATAL: could not create any TCP/IP sockets`

Can someone help me fix this?

Koopakiller
  • 2,679
  • 3
  • 27
  • 44
lll
  • 89
  • 1
  • 4
  • I had to clean up my etc/hosts file, there was a lot of mess there, then I was getting FATAL: could not open directory "pg_tblspc": No such file or directory, but this was easy to fix following this questions: http://stackoverflow.com/questions/25970132/pg-tblspc-missing-after-installation-of-os-x-yosemite – lll Aug 09 '15 at 18:05

1 Answers1

9

Check your /etc/hosts file for missing line:

127.0.0.1 localhost.localdomain localhost

Regards

H

hlihovac
  • 348
  • 2
  • 10