After installing the homebrew on my macOS, when I ran the brew command on the Terminal app I received the error zsh: command not found: brew
Solution to brew not found error!
When you install brew in macOS it gets installed at the location - /opt/homebrew, in order to run the brew command you need to cd this location and get into the bin directory and run the brew commands.
The above solution will work but is not an ideal way of running the brew command, it's better to add the path of brew installation in the .zshrc file
- Open the .zshrc file using command: nano ~/.zshrc,
- Now add the following to the file: export PATH="$PATH:/opt/homebrew/bin/"
- Save the file by pression Control + X followed by Enter.
- Apply the changes by command: source ~/.zshrc
Now you can run the brew command from anywhere!
Have Questions? Post them here!
- Disable Fading Edges Scroll Effect Android Views - Android
- Android : Class file collision: A resource exists with a different case - Android
- Error: Can not find the tag library descriptor for "struts-tags" - Java
- [Java Threads] Should we extend Thread Class or implement Runnable interface - Java
- Android : Unable to load VM from snapshot : Mac OS X Error - Android
- Sublime Add text at start and end of each line - Sublime
- INSTALL_FAILED_INSUFFICIENT_STORAGE Android Error - Android
- INSTALL_FAILED_INSUFFICIENT_STORAGE Error Android Emulator - Android
- Change Android EditText Cursor Height - Android
- Align left align text in Bootstrap - Bootstrap
- Android Studio : Implement abstract methods shortcut - Android-Studio
- Android Studio Ctrl Shift o auto import not working - Android
- Detect swipes on Android Activity - Android
- Facebook | Error : Sorry, something went wrong We're working on it and we'll get it fixed as soon as we can - Facebook
- How to copy Chrome alert popup text to clipboard - Chrome