Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Keg-only homebrew formulas

Tags:

macos

homebrew

Today I installed the curl formula via homebrew, but after installing it (and re-sourcing the shell) i noticed that :

% which curl  /usr/bin/curl 

as a matter of fact, the output of brew install curl stated that it was a keg-only formula, and that since curl was already present in OS X, it didn't link it into Homebrew prefix, as that could cause unspecified problems.

Then it proceeds stating that

Generally there are no consequences of this for you

I would like to know:

  • What sorts of problems exactly?
  • What is the purpose of installing keg-only formulas via Homebrew? How can there be no consequences if the newly installed tool is not in the PATH?
like image 275
asymmetric Avatar asked Jan 14 '11 13:01

asymmetric


People also ask

Is keg-only which means it was not Symlinked into opt Homebrew?

The packages for which the symlinking step is skipped are called keg-only. If you want to override Homebrew's decision not to symlink a package into /usr/local , you can modify your PATH variable as in the suggestion from brew that you've posted.

What is a Homebrew formula?

Homebrew Formulae is an online package browser for Homebrew – the macOS (and Linux) package manager. For more information on how to install and use Homebrew see our homepage.

Where does Homebrew install formulas?

Packages are installed according to their formulae, which live in /usr/local/Homebrew/Library/Taps/homebrew/homebrew-core/Formula .


1 Answers

  • Problems: if a homebrew application is put in the path in front of the default OS X version of the same, really anything might happen. Most common issues are caused by differences between the set of command line options available in the two versions, or differences in the meaning of the options. For curl the consequences might not be so bad, but for other applications you could, at worst, break the OS.
  • Keg-only: now you have two versions of curl! The default OS X, and the homebrew. If you want to use features that are not in the default but in the homebrew, you can do so by calling the homebrew curl explicitly. The precise path depends on how you've got homebrew set up. Because the newly installed version is not in the path, its unlikely to cause a problem unless it is explicitly called.
like image 166
martin clayton Avatar answered Sep 18 '22 17:09

martin clayton