Homebrew / install

📥 Homebrew (un)installer
https://brew.sh
BSD 2-Clause "Simplified" License
2.15k stars 1.02k forks source link

Warning: /opt/homebrew/bin is not in PATH during Homebrew Installation #838

Closed issamelferkh closed 6 months ago

issamelferkh commented 6 months ago

What you were trying to do (and why)

Trying to install Homebrew on a Mac with an M2 chip. I wanted to use Homebrew to manage packages and utilities on my Mac.

What happened (include command output)

When trying to install Homebrew, I encountered the following warning message:

Warning: /opt/homebrew/bin is not in your PATH.

~ % brew  
zsh: command not found: brew

To resolve this issue, I manually added export PATH=/opt/homebrew/bin:$PATH to my ~/.zshrc file:

What you expected to happen

I expected Homebrew to be installed successfully without any warnings or errors.

Step-by-step reproduction instructions (by running brew commands)

  1. Attempt to install Homebrew on a Mac with an M2 chip.
  2. Encounter the warning message: Warning: /opt/homebrew/bin is not in your PATH.
  3. Receive the error message: zsh: command not found: brew.
  4. Manually add export PATH=/opt/homebrew/bin:$PATH to ~/.zshrc to resolve the issue.
MikeMcQuaid commented 6 months ago

This is expected behaviour and what the installer tells you to do.