2

I tried to install postgresql on my macbook (mojave) through homebrew:

brew install postgresql

But when I try to start postgresql manually:

pg_ctl -D /usr/local/var/postgres start

I get this message:

The program “postgres” is needed by pg_ctl but was not found in the same directory as “/usr/local/Cellar/libpq/11.5/bin/pg_ctl”. Check your installation.

What can I do to fix this?

2 Answers 2

1

I came across this error and managed to solve the problem by:

  • uninstall Postgres
  • reinstall Postgres
  • manage Postgres startup using Homebrew (brew services <stop/start/restart> postgresql)

Not a proper casual explanation of the postgres/pg_ctl interaction but hopefully of use in getting you unstuck.

1

I had to upgrade my postgres in order to solve this issue.

brew upgrade postgresql

Here is the question from I took the solution:

https://dba.stackexchange.com/questions/242313/postgres-server-is-not-starting

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .