What does "brew link" do?

mbaytas picture mbaytas · Oct 21, 2015 · Viewed 68.7k times · Source

When I run brew doctor I get the common warning:

Warning: You have unlinked kegs in your Cellar
Leaving kegs unlinked can lead to build-trouble and cause brews that depend on
those kegs to fail to run properly once built. Run `brew link` on these:
# [...]

What does it mean for kegs to be unlinked? And what does brew link do exactly?

Answer

leeor picture leeor · Oct 21, 2015

brew link creates symlinks to installations you performed manually in Cellar. This allows you to have the flexibility to install things on your own but still have those participate as dependencies in homebrew formulas.

See the FAQ for more information.

You should follow those instructions and run brew link on the entries it lists.