No PostgreSQL clusters exist; see “man pg_createcluster”


After installing postgresql in a new Ubuntu 14.04 installation you get the error:

No PostgreSQL clusters exist; see "man pg_createcluster"

and when you try to start the server with:

sudo service postgresql start

you get the error that the server does not exist:

psql: coud not create to server: No such file or directory ...


The solution can be found in the article here, and is to create manually the first cluster by:

sudo pg_createcluster 9.3 main