brewdoctorのでPythonのエラー
※自分の備忘録と、同じようなエラーあたった人がなるべく早く記事にたどり着けるようにと、書きました。
起こった背景
brew doctor
とうち、もろもろきれいにしていたところ、Pythonのところで詰まる。
以下のエラーが発生
$ brew doctor ~省略~ Warning: You have unlinked kegs in your Cellar. Leaving kegs unlinked can lead to build-trouble and cause brews that depend on those kegs to fail to run properly once built. Run `brew link` on these: python
そこで指示通りに brew link python
とうってもエラー
Linking /usr/local/Cellar/python/3.7.3... Error: Permission denied @ dir_s_mkdir - /usr/local/Frameworks
そこで、/usr/local/Frameworks
に移動したところ、そうしたディレクトリさえない。
ここで対応がわからなかった。
解決法
以下の記事で言及されていた。 ありがとうございます!!
$ sudo mkdir /usr/local/Frameworks $ sudo chown $(whoami):admin /usr/local/Frameworks
- ディレクトリを作る
- 権限を与える
brew link python