-
-
Notifications
You must be signed in to change notification settings - Fork 9.7k
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
-bash: brew: command not found after pkg install and adding brew shellenv to bash #16803
Closed
3 tasks done
Comments
I have also the problem . What will I do to fix the problem? |
You should add |
ZhongRuoyu
added a commit
that referenced
this issue
Mar 3, 2024
The existing instructions is perhaps not clear enough: To add Homebrew to your `PATH` run `brew shellenv` in your shell profile (e.g. `~/.bash_profile` or `~/.zprofile`) Fixes #16803.
ZhongRuoyu
added a commit
that referenced
this issue
Mar 3, 2024
The existing instructions is perhaps not clear enough: To add Homebrew to your `PATH` run `brew shellenv` in your shell profile (e.g. `~/.bash_profile` or `~/.zprofile`) Fixes #16803.
ZhongRuoyu
added a commit
that referenced
this issue
Mar 3, 2024
The existing instructions is perhaps not clear enough: To add Homebrew to your `PATH` run `brew shellenv` in your shell profile (e.g. `~/.bash_profile` or `~/.zprofile`) Fixes #16803.
7 tasks
Thank you much more. It works.
Dush, 4-mar, 2024, 03:29 Ruoyu Zhong ***@***.***>:
… You should add eval "$(/opt/homebrew/bin/brew shellenv)" to
~/.bash_profile instead of plain /opt/homebrew/bin/brew shellenv.
—
Reply to this email directly, view it on GitHub
<#16803 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/BABWDSBTJB66X2HEMASIJJTYWOP3FAVCNFSM6AAAAABEEEIJB2VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTSNZVGM4DAMRWGI>
.
You are receiving this because you commented.Message ID:
***@***.***>
|
Ok to close. I see less people will have the same confusion moving forward with those commits to improve clarity of directions |
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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)?
use the software
What happened (include all command output)?
vi .bash_profile
added 'brew shellenv' as the final line, saved.
$ source .bash_profile
-bash: brew: command not found
I grabbed the full path to brew and edited .bash_profile last line to:
/opt/homebrew/bin/brew shellenv
I sourced the file again and was shown:
export HOMEBREW_PREFIX="/opt/homebrew";
export HOMEBREW_CELLAR="/opt/homebrew/Cellar";
export HOMEBREW_REPOSITORY="/opt/homebrew";
export PATH="/opt/homebrew/bin:/opt/homebrew/sbin${PATH+:$PATH}";
export MANPATH="/opt/homebrew/share/man${MANPATH+:$MANPATH}:";
export INFOPATH="/opt/homebrew/share/info:${INFOPATH:-}";
brew is still not found.
$ brew help
-bash: brew: command not found
'which brew' returns null
if I echo $PATH the path does not show an entries for /opt/homebrew/bin or /opt/homebrew/sbin
I am trying to follow the Installation instructions but they are not working
Running the command directly produces same results
$ /opt/homebrew/bin/brew shellenv
I have looked in Common Issues, FAQ nothing there about this. The Installation document has zero information on this https://docs.brew.sh/Installation The final page of the pkg installer is what is instructing me to add this to add homebrew to path
If you expect user to manually edit their path because this 'shellenv' does nothing then please provide the steps you would like them to take in Installation document.
What did you expect to happen?
the software to respond
Step-by-step reproduction instructions (by running
brew
commands)The text was updated successfully, but these errors were encountered: