Install Homebrew on Mac

The most updated instruction can be found on their website: https://brew.sh

On your Mac, open the Terminal and paste this code:

/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"

Your mac will ask password.

Installation will take some time. At the end of the installation, this message will show:

Warning: /opt/homebrew/bin is not in your PATH.
==> Installation successful!

==> Homebrew has enabled anonymous aggregate formulae and cask analytics.
Read the analytics documentation (and how to opt-out) here:
  https://docs.brew.sh/Analytics
No analytics data has been sent yet (or will be during this `install` run).

==> Homebrew is run entirely by unpaid volunteers. Please consider donating:
  https://github.com/Homebrew/brew#donations

==> Next steps:
- Add Homebrew to your PATH in /Users/your_user_name/.zprofile:
    echo 'eval "$(/opt/homebrew/bin/brew shellenv)"' >> /Users/your_user_name/.zprofile
    eval "$(/opt/homebrew/bin/brew shellenv)"
- Run `brew help` to get started

This message confirmed that homebrew has been installed.

But it wont run yet. Homebrew should be added to your PATH. To do that, you have to copy and paste that code shown on the ==> Next steps:

Copy the code starting from the line:

echo 'eval "$( . . . 

Paste that you your terminal and run it.

Copy the second line and hit enter:

eval "$(/opt/homebrew/bin/brew shellenv)"

To check if it runs properly, type this code:

brew help

That’s it. You can now use homebrew to install packages like ffmpeg, youtube-dl etc.

Leave a Comment

Your email address will not be published.