I had homebrew installed on my mac. Today after sometime, I tried to download psql through brew on my mac on terminal but I keeping getting:
zsh: command not found: brew
I have it installed so I do not know why zsh is not picking brew?
I had homebrew installed on my mac. Today after sometime, I tried to download psql through brew on my mac on terminal but I keeping getting:
zsh: command not found: brew
I have it installed so I do not know why zsh is not picking brew?
First you have run the below command for install homebrew on particular path
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
And then set the path using below command
echo export PATH="/opt/homebrew/bin:$PATH" >> ~/.zshrc
Its working fine for MacOS
export PATH="/opt/homebrew/bin:$PATH" >> ~/.zshrc
does not add the line starting with export PATH
to ~/.zshrc
. It only adds the stdout from running that command to ~/.zshrc
, and the command has no stdout at all. –
Iridescent echo 'export PATH="/opt/homebrew/bin:$PATH"' >>~/.zshrc
instead? –
Iridescent (it could be similar for windows users as well, but need to check or refer this: https://brew.sh/)
This solution is for Mac Users:
Install using this command in your terminal.
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"#
Once, it says, Installation is successful, run these commands: (note: replace adminmacks in below queries with your username of mac.)
==> Next steps:
- Run these two commands in your terminal to add Homebrew to your PATH:
(echo; echo 'eval "$(/opt/homebrew/bin/brew shellenv)"') >> /Users/adminmacks/.zprofile
eval "$(/opt/homebrew/bin/brew shellenv)"
- Run brew help to get started
© 2022 - 2024 — McMap. All rights reserved.
brew
is located to your path. Try addingpath+=(/usr/local/bin)
to the.zshrc
file in your home directory and restarting the terminal session. More about paths here: #11530590 and here: andysbrainbook.readthedocs.io/en/latest/unix/… – Herring