简体   繁体   中英

-bash command not found

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: homebrew: command not found.

The command for homebrew is brew , not homebrew .

You can reset your path by restarting your shell. If you changed it in your ~/.bash_profile, edit it with TextEdit or similar first to remove the offending line, and restart the shell.

Quit Terminal.app and relaunch; environment variables set with export should not persist across launches.

(You may need to close windows explicitly in case Lion's automatic window restoration interferes.)

This could fix your problem, copy and paste the following into your terminal window and press enter:

echo export PATH="/usr/local/bin:/usr/local/sbin:/usr/local/mysql/bin:$PATH" >> ~/.profile

and then:

source ~/.profile

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM