LoginSignup
75
77

More than 5 years have passed since last update.

環境変数の確認とパスの追加

Last updated at Posted at 2015-10-19

brew doctorの実行で失敗したら

Homebrewをインストールして試しにbrewコマンドが実行されない時には.bash_profileにbrewコマンドを追加してあげる必要があります。

例えば以下のようなコマンドが実行されない時。
brew doctor

環境変数の確認
$ echo $PATH
もし表示結果に/usr/local/binがなければ追加してあげます。

環境変数にパスを追加
$ echo export PATH='/usr/local/bin:$PATH' >> ~/.bash_profile
export PATH=/usr/local/bin:$PATHUser/ユーザー名/.bash_profileに書き込んでいます。

bashの設定を再読み込み
$ source ~/.bash_profile

※追加しただけではすぐ反映されないので再読み込みが必要

まとめ

brewコマンドが実行できなかったら.bash_profileにパスを追加してみる!

75
77
2

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
75
77