How to Install Homebrew on an M4 Mac (2025 Edition)
Thank you for your continued support.
This article contains advertisements that help fund our operations.
Table Of Contents
This article summarizes how to install Homebrew on an M4 Mac as of 2025.
Error Detail
command not found: brew
or
brew: command not found
This will help resolve these errors.
Visit the Homebrew Page
You will find an installation command there. Run it in your terminal:
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
If the command doesn't work, refer to this article: How to Fix 'xcode-select: note: No developer tools were found, requesting install'
Once the installation starts, you will see logs like the following:
==> Next steps:
- Run these commands in your terminal to add Homebrew to your PATH:
echo >> /Users/ma/.zprofile
echo 'eval "$(/opt/homebrew/bin/brew shellenv)"' >> /Users/ma/.zprofile
eval "$(/opt/homebrew/bin/brew shellenv)"
Follow the instructions and run the three commands below:
echo >> /Users/ma/.zprofile
echo 'eval "$(/opt/homebrew/bin/brew shellenv)"' >> /Users/ma/.zprofile
eval "$(/opt/homebrew/bin/brew shellenv)"
Note: The paths may vary depending on your environment. Do not copy the commands from this article directly. Always copy and execute the commands displayed in your terminal.
brew -v
Homebrew 4.5.2
That's it!