-2

I have installed Brew in MACOS Monterey with the following commands. mkdir homebrew && curl -L https://github.com/Homebrew/brew/tarball/master | tar xz --strip 1 -C homebrew

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

brew update --force --quiet

chmod -R go-w "$(brew --prefix)/share/zsh"

I have tested it after the install, and it works, however closing the terminal session and opening it again causes terminal to say that the command brew is not found after running it. I can still see the homebrew directory, so Im guessing its in the wrong place for terminal to run it.

3 Answers3

0

The only supported method to install brew is found on brew.sh:

  • /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
Richard Barber
  • 5,257
  • 2
  • 15
  • 26
0

For me works adding:

eval "$(/home/linuxbrew/.linuxbrew/bin/brew shellenv)"

to ~/.zshrc

ktt0xz
  • 1
  • 1
-1

Ok I was able to fix the issue by adding the PATH to the .bash_profile file.