Closed nbro closed 3 months ago
This issue's title and/or description do not reference a single formula e.g.
brew install wget
. If they do, open an issue at https://github.com/Homebrew/homebrew-core/issues/new/choose instead.
They do.
Please have a look at the caveats in output of brew info postgresql@16
; they should also have been shown to you at the end of brew install
. The keg-only status of postgresql@16
means the executables are not added to PATH
. To make them visible, add export PATH="/opt/homebrew/opt/postgresql@16/bin:$PATH"
to your shell profile like ~/.zshrc
.
@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 postgresql@14
be linked poured (? not sure if I'm using the lingo right) but newer versions like @15
and @16
not be? I understand from brew info
that they aren't poured linked because @14
is, but why when there are newer versions available?
Because postgresql@14
was renamed from plain postgresql
, which (as you might have guessed) was not keg-only, hence linked. This will remain so until v14 is removed as part of Homebrew's standard EOL handling, at which point no PostgreSQL formula will be linked: https://github.com/Homebrew/homebrew-core/issues/167593#issuecomment-2028803720
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 https://github.com/Homebrew/brew/issues/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)