I just got a new Mac, the M1 Macbook pro and I am trying to install homebrew, but every time I finish installing it, it tells me that it was not written to the path, and then when I try the advised whatever to add to the path, nothing happens and the terminal or whatever does not recognize the command at all, as if it isn't installed.
This worked perfectly fine on my old Intel mac, and there is some step or whatever - I don't know anything, and I am tired and I don't understand how to install this at all, but hte path is supposed to be different for Apple silicon macs but nothing i read helps at all.
Now, on your new M1 Mac, you can install Homebrew with /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)" . After the install is complete you'll see a message similar to the one below. Remember, Homebrew is now going to install packages in /op/homebrew/bin .
How to install Homebrew on macOS Catalina or M1 Mac Open Terminal and enter this command xcode-select --install Click Install from the popup. Go through the T&C and click Agree if you do.
Homebrew is a package manager for macOS which lets you install free and open-source software using your terminal. You’ll use Homebrew to install developer tools like Python, Ruby, Node.js, and more. In this tutorial you’ll install and use Homebrew on your Mac. You’ll install system tools and desktop applications from the command line interface.
Homebrew will update its list of packages and then download and install the tree command: Homebrew installs files to /usr/local by default, so they won’t interfere with future macOS updates. Verify that tree is installed by displaying the command’s location with the which command:
Open Terminal and type brew -v You will see the version of Homebrew installed on your Mac. Tip: brew doctor lets you know about Homebrew status, issues, and updates, if available or required. Now that you have installed Homebrew, let’s see how to use it.
Homebrew installation on apple silicon, step by step:
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
In my case, installation show me errors, I just installed again, and then show: Installation successful!, and warning: /opt/homebrew/bin is not in your PATH
touch ~/.zshrc
Then open it to edit with TextEdit (Is a hidden file. You can show hidden files with shift + command + . )
Add this line at the end of .zshrc
export PATH=/opt/homebrew/bin:$PATH
source ~/.zshrc
brew help
This works for me to path homebrew permanently.
Or do:
- Add Homebrew to your PATH in ~/.zprofile:
echo 'eval $(/opt/homebrew/bin/brew shellenv)' >> ~/.zprofile
eval $(/opt/homebrew/bin/brew shellenv)
Seems Touch, source and export
not required now.
Run the below command in terminal
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
and follow the instructions showing in terminal itself. shows as follows:
==> Next steps:
Run these two commands in your terminal to add Homebrew to your PATH:
echo 'eval "$(/opt/homebrew/bin/brew shellenv)"' >> /Users/xxx/.zprofile
eval "$(/opt/homebrew/bin/brew shellenv)"
Then, brew help
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With