Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

PostgresSQL Installation fails: "database cluster initialisation failed" MAC os

I am installing PostgreSQL (V 9.6.16) on macOS Catalina 10.15.1. Before it finishes installing I am getting the following error:

Problem running post-install step. Installation may not complete correctly The database cluster initialisation failed.

How can I solve this?

like image 890
Mirzohid Akbarov Avatar asked Dec 05 '19 06:12

Mirzohid Akbarov


People also ask

What is the best way to install PostgreSQL on Mac?

Step by step guide to set up a local PostgreSQL on Mac using DBngin: Download DBngin from it's download page and install on your Mac just like any other Mac apps. Open DBngin and click on + new server button. Choose PostgreSQL from the driver list, choose your PostgreSQL version, and name you server.


1 Answers

  1. Uninstall PostgresSQL and then clean /Library/PostgreSQL/ Directory.
  2. Open teminal and run :

    sudo dscl . -create /Users/postgres UserShell /bin/sh

    sudo dscl . -create /Users/postgres NFSHomeDirectory /Library/PostgreSQL

  3. Install PostgresSQL
like image 122
Mirzohid Akbarov Avatar answered Sep 18 '22 12:09

Mirzohid Akbarov