When executed brew install python, I got "Error: Permission denied @ dir_s_mkdir" below.


$ brew install python

...
==> Installing python

==> Downloading 
https://homebrew.bintray.com/bottles/python-3.7.1.mojave.bottle.8.tar.gz

######################################################################## 100.0%
==> Pouring python-3.7.1.mojave.bottle.8.tar.gz
Error: An unexpected error occurred during the `brew link` step
The formula built, but is not symlinked into /usr/local
Permission denied @ dir_s_mkdir - /usr/local/Frameworks
Error: Permission denied @ dir_s_mkdir - /usr/local/Frameworks

Cause

https://qiita.com/Jung0/items/d4012814e6fb1b694208

There was no directory named "/usr/local/Frameworks".

Solution

The solution was the same to the article above.
I created a directory "/usr/local/Frameworks", and gave permissions.

sudo mkdir /usr/local/Frameworks
sudo chown $(whoami):admin /usr/local/Frameworks