jalankan locate initdb
itu akan memberi Anda daftar untuk dipilih. seperti:
MacBook-Air:~ vao$ locate initdb
/usr/local/Cellar/postgresql/9.5.3/bin/initdb
/usr/local/Cellar/postgresql/9.5.3/share/doc/postgresql/html/app-initdb.html
/usr/local/Cellar/postgresql/9.5.3/share/man/man1/initdb.1
/usr/local/Cellar/postgresql/9.6.1/bin/initdb
/usr/local/Cellar/postgresql/9.6.1/share/doc/postgresql/html/app-initdb.html
/usr/local/Cellar/postgresql/9.6.1/share/man/man1/initdb.1
/usr/local/bin/initdb
/usr/local/share/man/man1/initdb.1
Jadi dalam kasus saya, saya ingin menjalankan
/usr/local/Cellar/postgresql/9.6.1/bin/initdb
Jika Anda belum menginstal mlocate, instal atau gunakan
sudo find / -name initdb