ITECH4MAC
  • Home
  • Guides & tutorials
    • TechTalk
    • macOS tutorials
    • Homebrew package tutorials
    • Create Bootable MacOS
    • Applications troubleshooting
    • iPhone tutorials
    • virtual machine
  • iPhone
    • 2021 >
      • iPhone 13 Pro Max
      • iPhone 13 Pro
      • iPhone 13
      • iPhone 13 Mini
    • 2020 >
      • iPhone 12 Pro Max
      • iPhone 12 Pro
      • iPhone 12
      • iPhone 12 Mini
      • iPhone SE 2nd
    • 2019
    • 2018
    • 2017
  • Downloads
  • YouTube Channel ➚
  • Request support

4/2/2021

How to fix "Zsh: command not found - brew" on MacBook M1 silicon devices

14 Comments

Read Now
 
Homebrew can be installed on Apple silicon M1 devices but the installation script put the files into this directory 
(/opt/homebrew)
So, when you try to use any command like "brew help"
​you will get this error message        "Zsh: command not found - brew"
which means you have to move homebrew to its correct place under usr/local folder
You can watch the correct process for homebrew installation from here
To correct the installation you have to use these commands separately on terminal
 1) Write this command on terminal; and press return
​
export PATH="/opt/homebrew/bin:$PATH"
​
​
2) Then this command on terminal and press return 

​echo 'export PATH="/opt/homebrew/bin:$PATH"' >> $HOME/.zshrc
​

​you will see nothing after these commands and this is good.
now, write the command "brew help"
you will find that everything is ok and homebrew is working correctly :)

​To watch the process of correcting homebrew installation, follow this link

Please don't hesitate to contact me if you faced any problem while applying the process.
​

- If you find the video helpful, please 
press the red button and subscribe to my YouTube Channel where you will find more tutorials. this will be great and push me to do the best :).
​

Related articles

How to install Homebrew, UPX, & Cask
How to install Homebrew, UPX, & Cask
How to completely uninstall homebrew without leaving any leftover files
How to completely uninstall homebrew without leaving any leftover files
How to solve the homebrew error "Zsh: command not found - brew" on intel devices
How to solve the homebrew error "Zsh: command not found - brew" on intel devices

You may also like:

How to Quit all apps on macOS desktop by single click?
How to Quit all apps on macOS desktop by single click?
How to create a DMG installer for your new application?
How to create a DMG installer for your new application?
How to activate additional preferences on your MacBook ?
How to activate additional preferences on your MacBook ?
​Fix the Battery drain issue, Battery service recommended, Battery capacity reduced
​Fix the Battery drain issue, Battery service recommended, Battery capacity reduced
How to create a bootable official macOS Big Sur USB install drive?
How to create a bootable official macOS Big Sur USB install drive?
How to change your Mac cursor to a customised image (face, finger, animal)?
How to change your Mac cursor to a customised image (face, finger, animal)?

Share

14 Comments
José Rodríguez
4/24/2021 07:55:41 pm

thank you so much i have struggled for like 6 hours, muchas gracias

Reply
Sherif
4/24/2021 07:59:28 pm

I am happy to hear that it worked :) thank you

Reply
Steve
4/25/2021 10:55:28 am

upx wont install on the M1. I have changed the path as suggested, but no bottles come up.
Any help would be appreciated

Reply
purnadi
5/21/2021 01:48:25 am

wow.. great.. thanks you. it permanently works..

Reply
Tod
5/30/2021 10:07:43 am

brew install upx
Error: upx: no bottle available!
You can try to install from source with:
brew install --build-from-source upx
Please note building from source is unsupported. You will encounter build
failures with some formulae. If you experience any issues please create pull
requests instead of asking for help on Homebrew's GitHub, Twitter or any other
official channels.

what I should do to install ups om Mac M1

Reply
sherif eid
5/30/2021 09:47:52 pm

please test if you installed homebrew correctly, just write this command "brew doctor" on terminal ,, inform me what message you get ?

Reply
aylen
6/3/2021 02:01:50 am

i have the same problem, the brew doctor says: Your system is ready to brew.

Man
6/15/2021 09:49:34 am

Hi, I am having the same issue.
I followed the steps above but "brew help" or "brew doctor" returns with the same error "Zsh: command not found - brew"

Is there a way to uninstall brew and follow the steps again?

Also, following the brew installation video, it never puts any file in usr folder.

Thanks

Tod
6/1/2021 03:56:56 am

Thanks for replying, here is message I got.

[email protected] ~ % brew doctor
Please note that these warnings are just used to help the Homebrew maintainers
with debugging if you file an issue. If everything you use Homebrew for is
working fine: please don't worry or file an issue; just ignore this. Thanks!

Warning: Homebrew's "sbin" was not found in your PATH but you have installed
formulae that put executables in /opt/homebrew/sbin.
Consider setting your PATH for example like so:
echo 'export PATH="/opt/homebrew/sbin:$PATH"' >> ~/.zshrc
[email protected] ~ %

Reply
Sikhil
6/12/2021 06:38:07 pm

Hi..
I too had the same issues like Mr.Tod.
First it showed "no bottle available" and when I tried "brew doctor" it showed sbin was not found in your path.
Pls help..

Reply
Sem
7/6/2021 06:49:47 pm

Hi Sherif Eid

I had the same issue with Tod.
Any solution for this problem?
-

Reply
Brian
7/11/2021 07:15:32 pm

This was really frustrating me, and this fix worked perfect! Thank you so much

Reply
Ayushman Kumar Priyadarshan
7/22/2021 06:34:00 pm

Thanks a lot. this issue cost me 4 days of struggling.

Reply
Simon
10/18/2021 01:00:48 am

Doesn't work, what a joke.

Reply



Leave a Reply.

Details

    Join Us, Interesting Homebrew package tutorials 👉

    Author

    Sherif Eid.

Powered by Create your own unique website with customizable templates.
  • Home
  • Guides & tutorials
    • TechTalk
    • macOS tutorials
    • Homebrew package tutorials
    • Create Bootable MacOS
    • Applications troubleshooting
    • iPhone tutorials
    • virtual machine
  • iPhone
    • 2021 >
      • iPhone 13 Pro Max
      • iPhone 13 Pro
      • iPhone 13
      • iPhone 13 Mini
    • 2020 >
      • iPhone 12 Pro Max
      • iPhone 12 Pro
      • iPhone 12
      • iPhone 12 Mini
      • iPhone SE 2nd
    • 2019
    • 2018
    • 2017
  • Downloads
  • YouTube Channel ➚
  • Request support