52
votes

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?
1
I find the wording of the "Generally there are no consequences of this for you" caveat very confusing, particularly mentioning LDFLAGS and CPPFLAGS. Took me a while to realize it’s printed for all keg-only formulae. The paragraph breaks don’t make it clear what the message pertains to.duozmo

1 Answers

57
votes
  • 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.