if you see this:
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
then do this:
sudo chown -R $(whoami) $(brew --prefix)/*
note the $(brew --prefix)/*
...High Sierra doesn't allow you to change permissions on /user/local directly)
then this:
sudo install -d -o $(whoami) -g admin /usr/local/Frameworks
...or just switch to MacPorts 😂
This works on Mojave: 10.14.5!
Thanks @dalegaspi for providing original solution!
@stacksjb @jmaha and @SparkyzCodez had an alternate solution that involves only changing permissions for the usr/local/Frameworks directory versus changing permissions for the usr/local directory:
Read more at https://pedrosneglectedtechblog.blogspot.com/2018/04/fix-on-macos-high-sierra-brew-link.html