Brew Install Python3
At this point, a problem occurs after the installation is complete:
Liyang@liyang~brew Install Python3
Updating Homebrew ...
==> auto-updated homebrew!
Updated 1 Tap (homebrew/php).
==> Updated Formulae
Homebrew/php/adminer Homebrew/php/drupalconsole
==> Installing dependencies for PYTHON3:GDBM
==> Installing Python3 dependency:gdbm
==> Downloading https://mirrors.tuna.tsinghua.edu.cn/homebrew-bottles/bottles/gd ######################### ######################################### 100.0%
==> Pouring gdbm-1.14.1_1.high_sierra.bottle.tar.gz
/usr/local/cellar/gdbm/1.14.1_1:20 files, 555.7KB
==> Installing Python3
==> Downloading https://mirrors.tuna.tsinghua.edu.cn/homebrew-bottles/bottles/py ######################### ######################################### 100.0%
==> Pouring python3-3.6.4_2.high_sierra.bottle.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
✘liyang@liyang~ls/usr/local/frameworks
LS:/usr/local/frameworks:no such file or directory
Two errors are found at this time, the first is the permissions issue, and the second is the/usr/local/frameworks directory does not exist.
First, we'll solve the problem of the directory.
sudo mkdir/usr/local/frameworks
After creating the table of contents, we started to solve the permissions issue, and through Google, we found that most of the processing methods are
sudo chown $ (whoami): admin/usr/local/
Although it can solve the problem, but not a good idea~, here is very not recommended, then the solution into:
sudo chown-r (whoami) (W H o a m) (WhoAmI) (brew–prefix)/*
At this point, the above two problems have been installed to complete, only need to link the last step can be.
Brew Link Python3
Linking/usr/local/cellar/python3/3.6.4_2 ... 1 symlinks created
At this point the Python3 is already installed (/usr/local/cellar/) and can be updated with brew later.
Reference links
https://github.com/Homebrew/homebrew-core/issues/19286
Https://stackoverflow.com/questions/16432071/how-to-fix-homebrew-permissions