0
1

Homebrewインストール時の"Warning: /opt/homebrew/bin is not in your PATH."

Last updated at Posted at 2024-09-02

「パスが通っていないよ」と言われる

Homebrew公式サイトからインストールコマンドをコピーし、ターミナル上でペースト&実行してみたところ、以下のようなメッセージが。

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!

インストール自体は成功したようですが、「パスが通っていないよ」とWarningが出ています。

$ brew -v
zsh: command not found: brew

当然、brewコマンドは使えません。

解決方法

# .zshrcを開く(bashの場合は.bashrc)
$ vi ~/.zshrc

# 以下を追加して閉じる
export PATH=/opt/homebrew/bin:$PATH

# 設定を反映する
$ source ~/.zshrc

これでパスを通すことができました。

$ brew -v
Homebrew 4.3.18

無事、brewコマンドが使えるようになりました。

0
1
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
1