Home > database >  Brew stops working after terminal session is closed
Brew stops working after terminal session is closed

Time:07-26

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.

CodePudding user response:

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)"

CodePudding user response:

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

  • Related