Skip to content

Instantly share code, notes, and snippets.

@jcoglan
Created May 15, 2014 20:03
Show Gist options
  • Save jcoglan/33971b0cc2bf89ed043f to your computer and use it in GitHub Desktop.
Save jcoglan/33971b0cc2bf89ed043f to your computer and use it in GitHub Desktop.
$ brew install mysql
Error: You must `brew link pkg-config' before mysql can be installed
$ brew link pkg-config
Linking /usr/local/Cellar/pkg-config/0.28...
Error: Could not symlink share/doc/pkg-config
/usr/local/share/doc is not writable.
$ sudo !!
sudo brew link pkg-config
Password:
Error: Cowardly refusing to `sudo brew link`
You can use brew with sudo, but only if the brew executable is owned by root.
However, this is both not recommended and completely unsupported so do so at
your own risk.
@rambo-panda
Copy link

sudo chown root:admin /usr/local/bin/brew

to do your somehting

sudo chown youruser:admin /usr/local/bin/brew

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