Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What does linking/unlinking with Homebrew mean?

Tags:

What does it mean to link/unlink something with Homebrew?

like image 423
Smitha Avatar asked Jan 16 '14 23:01

Smitha


People also ask

What does brew link node do?

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.

Is keg only and must be linked with -- force?

As a general rule, keg-only formulae should not be forced into the main Homebrew hierarchy via brew link , for the reasons documented in the formulae.

What does brew switch do?

What Is Switch Homebrew? Switch Homebrew or simply homebrew is a software or app that isn't authorized by Nintendo. It is similar to the jailbreaking process of the Apple ecosystem. Homebrew includes emulators, games, editing apps, tools, custom firmware, and other applications.


2 Answers

It symlinks the installed package (located in /usr/local/Cellar) to /usr/local.

So when you type for example:

$ <name-of-binary> 

in your terminal (ex. $ rvm), then the package installed via brew is run.

like image 120
Agis Avatar answered Nov 04 '22 06:11

Agis


It creates a symlink from packages installed in Cellar (regular packages installed with homebrew will already be linked).

What this also does is allow the symlinked installation from Cellar to serve as a dependency for other homebrew installations (if it's required). This is explained in another post.

Also with all homebrew commands you get a description of the formulae with the --help option (e.g. brew link --help).

like image 44
Aiden Cullo Avatar answered Nov 04 '22 05:11

Aiden Cullo