Skip to content

Instantly share code, notes, and snippets.

@polyglotdev
Created November 20, 2020 01:20
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save polyglotdev/2c21c26ccb5ff0fa61d1d154dad6d5c2 to your computer and use it in GitHub Desktop.
Save polyglotdev/2c21c26ccb5ff0fa61d1d154dad6d5c2 to your computer and use it in GitHub Desktop.
Homebrew Extension Issue

Homebrew Extension Issue

After installing the Big Sir 11.0 update I attempted to install graphviz to use with a tool that will map dependecies in node.js projects. The output looked like this:

❯ brew install graphviz                  
Updating Homebrew...
==> Auto-updated Homebrew!
Updated 4 taps (hashicorp/tap, homebrew/cask-versions, homebrew/core and homebrew/cask).
==> New Formulae
libbsd
==> Updated Formulae
Updated 497 formulae.
==> New Casks
abyssoft-teleport                             avast-secure-browser                          bigsur-cache-cleaner                          iconset                                       yuna
==> Updated Casks
zoom-for-it-admins ✔                  devonthink                            hackintool                            multitouch                            rocket                                unity-lumin-support-for-editor
ableton-live-standard                 docker-edge                           hype                                  nova                                  scrivener                             unity-webgl-support-for-editor
aircall                               eaccess                               icab                                  nvidia-geforce-now                    sensei                                unity-windows-support-for-editor
amazon-chime                          electerm                              imazing                               openphone                             serial                                vanilla
axe-edit-iii                          electron-cash                         insync                                parallels-virtualization-sdk          sizzy                                 vsee
batteries                             electrum                              jalbum                                pastebot                              soulver                               whatsapp
boinc                                 elpass                                java-beta                             pinegrow                              spitfire-audio                        wormhole
brave-browser-beta                    eul                                   jump                                  pocket-casts                          ssh-config-editor                     xctu
brave-browser-dev                     exifrenamer                           knotes                                porting-kit                           tap-forms                             zoomus
cheatsheet                            foxmail                               lehreroffice                          pritunl                               texpad                                zotero
cisdem-pdfmanagerultimate             freac                                 loginputmac                           pyzo                                  thebrain
cleanshot                             fsnotes                               lyn                                   rekordbox                             thingsmacsandboxhelper
cmake                                 gfortran                              milanote                              rescuetime                            unity-android-support-for-editor
cyberduck                             glyphs                                mindjet-mindmanager                   resolume-arena                        unity-ios-support-for-editor
==> Deleted Casks
catalina-cache-cleaner                                                                                              djay-pro

Error: Failed to link all completions, docs and manpages:
  Permission denied @ dir_s_mkdir - /usr/local/share
Error: Permission denied @ dir_s_mkdir - /usr/local/share
Warning: You are using macOS 11.0.
We do not provide support for this released but not yet supported version.
You will encounter build failures with some formulae.
Please create pull requests instead of asking for help on Homebrew's GitHub,
Twitter or any other official channels. You are responsible for resolving
any issues you experience while you are running this
released but not yet supported version.

==> Downloading https://homebrew.bintray.com/bottles/freetype-2.10.4.big_sur.bottle.tar.gz
==> Downloading from https://d29vzk4ow07wi7.cloudfront.net/01b464b98584ba5777d8fc4605121c7a46e713a2f58d729197b82afef1b5f2b9?response-content-disposition=attachment%3Bfilename%3D%22freetype-2.10.4.big_sur.bottle.tar.gz%22&Policy=ey
######################################################################## 100.0%
==> Downloading https://homebrew.bintray.com/bottles/fontconfig-2.13.1.big_sur.bottle.tar.gz
==> Downloading from https://d29vzk4ow07wi7.cloudfront.net/ee5961891c9e943c8bea6ad280d2346caa2d3efafdbd726670e663d0bdfdb010?response-content-disposition=attachment%3Bfilename%3D%22fontconfig-2.13.1.big_sur.bottle.tar.gz%22&Policy=
######################################################################## 100.0%
==> Downloading https://homebrew.bintray.com/bottles/libtiff-4.1.0_1.big_sur.bottle.tar.gz
==> Downloading from https://d29vzk4ow07wi7.cloudfront.net/0f66c74d4ba96a1e9bac88a58a52335eaa0944de258e608ef62370e80fc5b24a?response-content-disposition=attachment%3Bfilename%3D%22libtiff-4.1.0_1.big_sur.bottle.tar.gz%22&Policy=ey
######################################################################## 100.0%
==> Downloading https://homebrew.bintray.com/bottles/gd-2.3.0.big_sur.bottle.tar.gz
==> Downloading from https://d29vzk4ow07wi7.cloudfront.net/57db02960b120179fcd18257989a043f6d6f82212dde034e6efeffd9ec75434a?response-content-disposition=attachment%3Bfilename%3D%22gd-2.3.0.big_sur.bottle.tar.gz%22&Policy=eyJTdGF0Z
######################################################################## 100.0%
==> Downloading https://homebrew.bintray.com/bottles/python%403.9-3.9.0_1.big_sur.bottle.tar.gz
==> Downloading from https://d29vzk4ow07wi7.cloudfront.net/bd4ebe03f4c8371c87b2e2db46d5a8ebe0d3f2940f64d8228b901048f1dd9290?response-content-disposition=attachment%3Bfilename%3D%22python%403.9-3.9.0_1.big_sur.bottle.tar.gz%22&Poli
######################################################################## 100.0%
==> Downloading https://homebrew.bintray.com/bottles/glib-2.66.2_1.big_sur.bottle.tar.gz
==> Downloading from https://d29vzk4ow07wi7.cloudfront.net/43eb87fa1004b3c5329ca342ea681b243423818002a08f9cdf37125356563438?response-content-disposition=attachment%3Bfilename%3D%22glib-2.66.2_1.big_sur.bottle.tar.gz%22&Policy=eyJT
######################################################################## 100.0%
==> Downloading https://homebrew.bintray.com/bottles/jasper-2.0.22.big_sur.bottle.tar.gz
==> Downloading from https://d29vzk4ow07wi7.cloudfront.net/ad3715537b3001b9a8924896e5c4e7eb90b21bb37e7171d964de2008edb13910?response-content-disposition=attachment%3Bfilename%3D%22jasper-2.0.22.big_sur.bottle.tar.gz%22&Policy=eyJT
######################################################################## 100.0%
==> Downloading https://homebrew.bintray.com/bottles/netpbm-10.86.17.big_sur.bottle.tar.gz
==> Downloading from https://d29vzk4ow07wi7.cloudfront.net/3540b31b88e9d8fc7288de5dac7b96be6f1c6652c604cfd167113bdf07738ca7?response-content-disposition=attachment%3Bfilename%3D%22netpbm-10.86.17.big_sur.bottle.tar.gz%22&Policy=ey
######################################################################## 100.0%
==> Downloading https://homebrew.bintray.com/bottles/gts-0.7.6_2.big_sur.bottle.tar.gz
==> Downloading from https://d29vzk4ow07wi7.cloudfront.net/659f27e7e8ab695125ffe0175bf4d915f5e5618fcae0c425180fc085c3388d41?response-content-disposition=attachment%3Bfilename%3D%22gts-0.7.6_2.big_sur.bottle.tar.gz%22&Policy=eyJTdG
######################################################################## 100.0%
==> Downloading https://homebrew.bintray.com/bottles/lzo-2.10.big_sur.bottle.tar.gz
######################################################################## 100.0%
==> Downloading https://homebrew.bintray.com/bottles/pixman-0.40.0.big_sur.bottle.tar.gz
==> Downloading from https://d29vzk4ow07wi7.cloudfront.net/0114710dd922d5e4839c9dea3b72cd5fbe6f00157dd63457c99ca15554cf8d7f?response-content-disposition=attachment%3Bfilename%3D%22pixman-0.40.0.big_sur.bottle.tar.gz%22&Policy=eyJT
######################################################################## 100.0%
==> Downloading https://homebrew.bintray.com/bottles/cairo-1.16.0_3.big_sur.bottle.tar.gz
==> Downloading from https://d29vzk4ow07wi7.cloudfront.net/42b20f0db683c4fe7a0d5ffbb605388e67d21abfba3c6578443f74d9839f80bb?response-content-disposition=attachment%3Bfilename%3D%22cairo-1.16.0_3.big_sur.bottle.tar.gz%22&Policy=eyJ
######################################################################## 100.0%
==> Downloading https://homebrew.bintray.com/bottles/fribidi-1.0.10.big_sur.bottle.tar.gz
######################################################################## 100.0%
==> Downloading https://homebrew.bintray.com/bottles/gobject-introspection-1.66.1_1.big_sur.bottle.tar.gz
==> Downloading from https://d29vzk4ow07wi7.cloudfront.net/e5894b5eec0b33c9d00d0b7b1159cdfe6a2947fcf9ac9ade5ff621f2df7932df?response-content-disposition=attachment%3Bfilename%3D%22gobject-introspection-1.66.1_1.big_sur.bottle.tar.
######################################################################## 100.0%
==> Downloading https://homebrew.bintray.com/bottles/graphite2-1.3.14.big_sur.bottle.tar.gz
######################################################################## 100.0%
==> Downloading https://homebrew.bintray.com/bottles/harfbuzz-2.7.2.big_sur.bottle.tar.gz
==> Downloading from https://d29vzk4ow07wi7.cloudfront.net/b671ba32ec768c207c1084659af272096394ecab59b58579d8c53902f739aaac?response-content-disposition=attachment%3Bfilename%3D%22harfbuzz-2.7.2.big_sur.bottle.tar.gz%22&Policy=eyJ
######################################################################## 100.0%
==> Downloading https://homebrew.bintray.com/bottles/pango-1.48.0.big_sur.bottle.tar.gz
==> Downloading from https://d29vzk4ow07wi7.cloudfront.net/48d12081cc6415724e0b6f73fef7ac2df3d5c523a408d65c5105f7c83e4a2f40?response-content-disposition=attachment%3Bfilename%3D%22pango-1.48.0.big_sur.bottle.tar.gz%22&Policy=eyJTd
######################################################################## 100.0%
==> Downloading https://homebrew.bintray.com/bottles/graphviz-2.44.1.big_sur.bottle.tar.gz
==> Downloading from https://d29vzk4ow07wi7.cloudfront.net/65570ff9f401d034947e1dae73c18fec9c14f3f96762f70076e4c58e42c5068a?response-content-disposition=attachment%3Bfilename%3D%22graphviz-2.44.1.big_sur.bottle.tar.gz%22&Policy=ey
######################################################################## 100.0%
==> Installing dependencies for graphviz: freetype, fontconfig, libtiff, gd, python@3.9, glib, jasper, netpbm, gts, lzo, pixman, cairo, fribidi, gobject-introspection, graphite2, harfbuzz and pango
==> Installing graphviz dependency: freetype
==> Pouring freetype-2.10.4.big_sur.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/share
Error: Permission denied @ dir_s_mkdir - /usr/local/share

The error plainly says, Error: Permission denied @ dir_s_mkdir - /usr/local/share. Don't spend time fussing with the @ in the message, the issue is that Homebrew did not have the correct permissions to create usr/local/share.

Before I tell you how I fixed it, let me caution you on just fucking willy nilly copying and pasting shit into the terminal. Save yourself the headaches and just don't do that.

  1. navigate to /usr/local/
  2. You probably have seen people say doing this sudo chown -R $(whoami) /usr/local is fine, but that is a horrible idea. Why give homebrew all that access when the error tells us that what it wanted was to create and put things in /usr/local/share? So instead of that 💩 from above do a sudo chown -R $(whoami) /usr/local/share and if the directory does not exist, then type: sudo mkdir share/ from within /usr/local/

Cheers, DH

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment