-
-
Notifications
You must be signed in to change notification settings - Fork 12.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
pg_ctl
and psql
not found after installing postgresql@16
#176587
Comments
They do. Please have a look at the caveats in output of |
@nbro Don't 👎🏻 people who have spent their time explaining the answer to your problem. It's not polite. |
I was already providing a workaround to the problem. The user just closed the issue as if this was not an issue. In my view, this is still an issue. If you install a specific version of PostgreSQL and there's no other version, then the associated binaries should be automatically added to the PATH. If there's already another version, then I agree that they should not be added to the PATH. In any case, brew should do these checks. You can definitely check if there's already another PostgreSQL version installed with brew. |
I'm new to PostgreSQL and quite unaware when it comes to Homebrew installations, but why would |
Because |
brew doctor
outputVerification
brew doctor
output" above saysYour system is ready to brew.
and am still able to reproduce my issue.brew update
twice and am still able to reproduce my issue.brew install wget
. If they do, open an issue at https://github.com/Homebrew/homebrew-core/issues/new/choose instead.brew config
outputWhat were you trying to do (and why)?
I tried to install PostgreSQL 16 using
brew install postgresql@16
.brew services list --all
shows now it's running afterbrew services start postgresql@16
.Now, I was expecting to be able to check the server status with
pg_ctl
too, for example, using the commandpg_ctl status -D /opt/homebrew/var/postgresql@16
, but I'm getting the following errorzsh: command not found: pg_ctl
The following command
psql -l
also returnszsh: command not found: psql
As opposed to Homebrew/brew#17288, now, I really have the data cluster at
/opt/homebrew/var/postgresql@16
, thoughApparently, these binaries should be at
/opt/homebrew/Cellar/postgresql@16/16.3/bin/
, but they were not added to the path. Shouldn't they be added automatically?So, the workaround so far is to add something like
export PATH="/opt/homebrew/Cellar/postgresql@16/16.3/bin:$PATH"
to my~/.bashrc
or~/.zshrc
, but shouldn't this be done automatically?I see only only one problem with this approach, i.e. if you want to install multiple postgresql versions. However, after installing postgresql, we should at least get a message that tells us how to add this directory to the path and check if our shell configuration files already export some of these directories from other potential brew installations
What happened (include all command output)?
Please, see above
What did you expect to happen?
Please, see above
Step-by-step reproduction instructions (by running
brew
commands)The text was updated successfully, but these errors were encountered: