Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Mac OSX (Apple Silicon) Homebrew installed but brew cmd not found

I have googled around the error I was experiencing but from what I could tell this issue is likely related to how the path in which Homebrew is saved for Big Sur/Apple Silicon is different than other Macbook approaches.

Following the instructions on the Homebrew page, I ran the cURL command:

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

However, after the operation successfully completed, there was a warning in terminal: warning: bin/opt/ path does not exist

And when I attempted to run a brew doctor the command was not found.

It's clear there is a pathing issue, but how do I solve it

like image 566
GPP Avatar asked Dec 31 '22 17:12

GPP


1 Answers

In this case, I discovered it was a combination of a PATH issue as well as the .zshrc file was missing from the ~/ directory

I was able to resolve the issue with these steps.

  1. Navigate to cd /opt/homebrew/bin/
  2. Run export PATH=$PATH:/opt/homebrew/bin
  3. Navigate back to "home" with cd ~/
  4. in this directory I found that there was no .zshrc file (:scream:)
  5. So I created a file with touch .zshrc and then
  6. ran this command: echo export PATH=$PATH:/opt/homebrew/bin >> .zshrc

And after running that command, I was able to successfully use the brew doctor and other related commands!

like image 74
GPP Avatar answered Jan 05 '23 17:01

GPP