Hackernoon logoApple M1 Chip: How To Install Homebrew Using Rosetta by@sameerbairwa

Apple M1 Chip: How To Install Homebrew Using Rosetta

Sameer Bairwa Hacker Noon profile picture

@sameerbairwaSameer Bairwa

Love to write, Software developer, freelancer, machine learning, always curious about new Things

Before December 2020 homebrew was not available for Apple Silicon chip.

Homebrew officially released it for the new apple silicon chip as homebrew 2.6.0

and they made some changes in the commands, In homebrew2.6.0 brew commands replacing all brew cask commands

Major changes and deprecations since 2.5.0:

Homebrew developers recommendation (We currently recommend running Homebrew using Intel emulation with Rosetta 2.)

How to install homebrew intel based

Best method:

1. Install Rosetta or update your rosetta

2. Duplicate your terminal

goto your applications folder and locate your favourite terminal, Right-click on the terminal icon and choose Duplicate

Now you have two terminals in your Applications Folder. Rename your newly created terminal with terminal rosetta or what you like.

Now next step to make your terminal rosetta enable. Right-click on the newly created terminal and click on Get Info, it will open a new window of the application Info. Marked the option “Open using Rosetta”.

Now you have two terminals one is native and other one is Rosetta

Install HomeBrew using Rosetta Terminal

To Install HomeBrew open the Rosetta Terminal and run the following command

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

Running this command will ask you for the password, and then It will provide you with the information of what all it will install and which new directories it will create.

Running this command will ask you for the password, and then It will provide you with the information of what all it will install and which new directories it will create.

Once you press Enter, it will begin the installation process and will also dump the logs of the process.

Using HomeBrew

Once HomeBrew is installed, you can start using it to install your required packages into the mac.

Run the following command to get brew help

brew help

To install a package, you can run the following command

brew install packagename
Example:
brew install node
brew install python
brew install watchman
brew installl 

That’s all about installing and getting started with Homebrew on Apple M1 Macs.

In the upcoming articles, we will try to resolve the error in package installation through brew and cocoapods. So stay tuned.

Related Articles:

If you found this article useful please clap and follow me, it will encourage me to write articles on tech.

Also published at https://medium.com/codex/setup-homebrew-in-new-apple-m1-chip-d0e4e695117d

Sameer Bairwa Hacker Noon profile picture
by Sameer Bairwa @sameerbairwa. Love to write, Software developer, freelancer, machine learning, always curious about new ThingsHire me

Tags

Join Hacker Noon

Create your free account to unlock your custom reading experience.