Keg-only homebrew formulas

2019-01-30 04:51发布

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条回答
Rolldiameter
2楼-- · 2019-01-30 05:37
  • 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.
查看更多
登录 后发表回答