code2care@mac bin % brew
zsh: command not found: brew
code2care@mac bin %
If you get brew command not found error when you run a brew command on zsh (or any other shell like bash) on macOS Terminal, there could be few reasons, 1) you many have not installed brew - if so please follow this article - Installing Brew, 2) you many not have set the PATH for brew,
![Brew command not found fix Brew command not found fix](https://code2care.org/howto/fix-command-not-found-brew-bash-zsh-on-macos-terminal/images/Brew command not found fix.png)
Brew command not found fix
Adding brew to PATH variable:
- Open Terminal,
- Go to /opt/homebrew/bin/ (if you do not find this path - brew is not installed - Article - Installing Brew),
- Run: export PATH=$PATH:/opt/homebrew/bin,
- Try running the brew version command to validate,
code2care@mac % brew --version
Homebrew 3.0.0
Homebrew/homebrew-core (git revision f1b2a2; last commit 2021-02-10)
code2care@mac / % brew help
Example usage:
brew search [TEXT|/REGEX/]
brew info [FORMULA...]
brew install FORMULA...
brew update
brew upgrade [FORMULA...]
brew uninstall FORMULA...
brew list [FORMULA...]
Troubleshooting:
brew config
brew doctor
brew install --verbose --debug FORMULA
Contributing:
brew create [URL [--no-fetch]]
brew edit [FORMULA...]
Further help:
brew commands
brew help [COMMAND]
man brew
https://docs.brew.sh
Comments:
- I was trying to install brew on my new Macbook and got stuck on this, thanks!!! worked like a charm!
Mike J: 02 Jan 2222 14:01:28 GMT
- Further comments disabled!
More Posts related to MacOS,
- Fix: grunt: command not found (Mac/Windows)
- AppleScript Example with TextEdit
- How to copy Password of Wifi on your Mac
- Install OpenJDK Java (8/11/17) versions using brew on Mac (Intel/M1/M2)
- How to check if a port is in use using terminal [Linux or macOS]
- Cut, Copy and Paste Keyboard Shortcuts on Mac Keyboard
- [macOS] NetBeans IDE cannot be installed. Java (JRE) found on your computer but JDK XX or newer is required.
- How to Remove Widgets from macOS Sonoma 14 Desktop
- Turn off Auto-Capitalization on macOS Ventura 13
- How to Go To /usr/local/bin on Mac Terminal?
- How to Open TextEdit on Mac
- Mac: How to Open Android Studio from Terminal
- How to change the default location of Mac Screenshot
- Display Seconds in Digital Clock on Mac Menu Bar [macOS]
- How to install homebrew (brew) on M1 Mac
- Must Know Homebrew Commands for Mac/Linux Users
- Steps to Uninstall Roblox on Mac (macOS)
- How to change the System Settings Sidebar icon size Mac Ventura 13
- How to set Out Of Office (OOO) on Outlook for Mac [Updated 2023]
- Trigger Notification Center Message using Mac Terminal Command
- [fix] macOS Ventura - Python3 xcrun: error: invalid active developer path missing xcrun at CommandLineTools
- How to Install Rust Language on Mac (macOS)
- How to minimize all Windows in Mac
- Display ls command file sizes in KB (kilobytes) MB (megabytes) or GB (gigabytes) [Linux/macOS]
- How to make TextEdit the default text Editor on Mac
More Posts:
- How to show file extensions on Windows 11 - Windows-11
- How to Get List of All Country Codes in Java Using Locale Class - Java
- Docker MySQL Compose File with Volume Example - Docker
- [Android Studio] Button on click example - Android-Studio
- How to add NewLine Character in Bash Script String - Bash
- How to Create a File using PowerShell on Mac - Powershell
- How to check zsh installed version using terminal - MacOS
- Random Date Generator Tool - Tools