Homebrew: Could not symlink, /usr/local/bin is not writable

Jikku Jose picture Jikku Jose · Oct 30, 2014 · Viewed 241.7k times · Source

While installing tig, HomeBrew is displaying the following issues while installing a dependency:

Error: The `brew link` step did not complete successfully
The formula built, but is not symlinked into /usr/local
Could not symlink bin/a2x
/usr/local/bin is not writable.

You can try again using:
  brew link asciidoc

Answer

Jikku Jose picture Jikku Jose · Oct 30, 2014

Following Alex's answer I was able to resolve this issue; seems this to be an issue non specific to the packages being installed but of the permissions of homebrew folders.

sudo chown -R `whoami`:admin /usr/local/bin

For some packages, you may also need to do this to /usr/local/share or /usr/local/opt:

sudo chown -R `whoami`:admin /usr/local/share
sudo chown -R `whoami`:admin /usr/local/opt