Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Get this result back when putting `postgres -D /usr/local/var/postgres` in terminal

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?

like image 300
lll Avatar asked Aug 08 '15 22:08

lll


1 Answers

Check your /etc/hosts file for missing line:

127.0.0.1 localhost.localdomain localhost

Regards

H

like image 79
hlihovac Avatar answered Nov 05 '22 12:11

hlihovac