I am new to mac and was following a video and typed export PATH="$HOME/opt/git/bin:$PATH"
I believe this messed up my path and I am not able to install MySQL now. When I tried to install homebrew I get -bash: brew: command not found
. I tried restarting the terminal and I am still getting this error.
-
How did you try to install Homebrew? Their website has instructions for setting it up.– jtbandesCommented May 10, 2012 at 9:03
-
Don't post the same question on multiple sites: superuser.com/questions/422761/…– MatteoCommented May 10, 2012 at 9:13
-
What does echo $PATH show?– mmmmmmCommented May 10, 2012 at 9:54
-
Let's close this until some more detail can be provided. It's not clear if we need a tutorial on BASH or a pointer to homebrew troubleshooting or something else entirely.– bmike ♦Commented May 7, 2013 at 16:13
-
for M1 Macbook after installing use: eval $(/opt/homebrew/bin/brew shellenv)– A JCommented Aug 30, 2022 at 8:49
3 Answers
Restarting the terminal should have solved the problem since you didn't append what you have typed to a bash start-up file.
Also, even if what you have typed was directed to a bash start-up file it wouldn't affect where bash would find brew
since you're prepending to the original path and not overwriting it.
Your problem lays in something else you've done that has changed the settings for your path in a bash start-up file or have deleted/altered the location of the executable.
Why aren't you able to install MySQL? What errors do you get? What form of package are you installing? Is it from the MySQL official site?
Recommended installation of brew
makes it reside in /usr/local/bin/
. Do you have that in your echo $PATH
output? Also, normal brew installation is a simple command that doesn't need brew to start with. So do you mean you get -bash: brew: command not found
after attempting the installation of brew
?
Unless you installed brew into /Users/<your_username>/opt/git/bin
, adding that to your PATH won't help you find it.
Did you instead install it at /opt/git/bin
?
brew is only for macs. oh!. i see you are using a mac. ok thn, open your terminal window. oh, its open. ok, then. i can help you no more. keep up the good work.
-
1Please be nice. We encourage people to ask questions so that they can learn. When answering, try to improve upon the silence. Your post was helpful since it caused me to realize that the question should be closed due to needing more detail - so I'm thankful for the assistance in locating a question that needs an edit. Feel free to flag these in the future explaining how a question isn't yet ready to get a good answer.– bmike ♦Commented May 7, 2013 at 16:11