Installing brew on M1/M2 ARM Mac


Install Brew on Mac

If you have an ARM-based M1 or M2 Apple Silicon Mac and want to install Brew (homebrew) follow the below steps,

  1. Open Terminal App,
  2. Now run the script:
    /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"

    Source: https://github.com/homebrew/install#uninstall-homebrew

  3. Now open .zshrc profile file to set brew PATH permanently,
    nano ~/.zshrc

    Add this line to the file export PATH=/opt/homebrew/bin:$PATH

  4. Now reload your shell: source ~/.zshrc
  5. Try running brew version command to see if got installed correctly.
  6. % brew --version    
    Homebrew 3.5.10
    Homebrew/homebrew-core (git revision ccafaef56d8; last commit 2022-09-04)

If the path is not set correctly or brew is not installed properly you will get an error like,

brew --version
zsh: command not found brew
-

Facing issues? Have Questions? Post them here! I am happy to answer!


Author Info:

Rakesh (He/Him) is a seasoned developer with over 10 years of experience in web and app development, and a deep knowledge of operating systems. Author of insightful How-To articles for Code2care.

Follow him on: X

You can also reach out to him via e-mail: rakesh@code2care.org

Copyright © Code2care 2024 | Privacy Policy | About Us | Contact Us | Sitemap