homebrew > インストール時 > Warning: /opt/homebrew/bin
Table of Content
homebrew > インストール時 > Warning: /opt/homebrew/bin
いっけん成功したかに見えたがWarningが出ててインストールできていなかった時
現象
以下のような場合。Installation successfulと表示されているが、brewコマンドを打っても反応しない
==> Downloading and installing Homebrew...
HEAD is now at 3ba6afb1d Merge pull request #12648 from bevanjkay/cask-comma-separator-style
Updated 1 tap (homebrew/cask).
Warning: /opt/homebrew/bin is not in your PATH.
Instructions on how to configure your shell for Homebrew
can be found in the 'Next steps' section below.
==> Installation successful!
中略
==> Next steps:
- Run these two commands in your terminal to add Homebrew to your PATH:
echo 'eval "$(/opt/homebrew/bin/brew shellenv)"' >> /Users/xxxx/.zprofile
eval "$(/opt/homebrew/bin/brew shellenv)"
- Run brew help to get started
- Further documentation:
https://docs.brew.sh
解決法
パスを通す
export PATH="$PATH:/opt/homebrew/bin"
brew -v