'How to install postgresql 9.6 on MacOS 12.1 Monterey, Intel chip?

I'm using MacOS Monterey 12.1 Intel chip, and Postgresql 9.6 installation from https://www.enterprisedb.com/downloads/postgres-postgresql-downloads

When I run EDB installation, it fails with below message

The database cluster initialization failed

After a couple hours for researching, I found that the installation will execute the ${postgres_home}/installer/server/initcluster.sh, then the initcluster.sh will execute ${postgres_home}/bin/postgres -V.

But the bin/postgres -V failed with message: zsh: segmentation fault ./postgres -V

Then, the initcluster.sh will be stopped and there is no database cluster to be installed.

Can anyone help me to install Postgresql9.6 on MacOS 12.1? Or I must wait for EBD's update?

Thanks



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source