No PostgreSQL clusters exist; see “man pg_createcluster”

Email this to someoneShare on Google+Share on FacebookTweet about this on TwitterShare on LinkedIn

Problem

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

and when you try to start the server with:

you get the error that the server does not exist:

Solution

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

Fixing a broken sudoers file without rebooting

Email this to someoneShare on Google+Share on FacebookTweet about this on TwitterShare on LinkedIn

Problem

If by accident you make a mistake in your sudoers file then you won’t be able to run sudo command after saving the file.

Solution

Following the answer here, you can simply run the command pkexec visudo, supply your password and provided you already had sudo permissions, fix the sudoers file, make sure that you save it using the Q when prompted, and you should be able to use sudo commands again.