Welcome toVigges Developer Community-Open, Learning,Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
278 views
in Technique[技术] by (71.8m points)

Understand homebrew and keg-only dependencies

I've recently started using homebrew, and I'm a bit confused as to what happens when I brew something onto my system, but its brewed dependencies are keg-only, meaning that they are linked under /usr/local.

For example, I'm install vips (an image processing library). One of its many dependencies is pixman. Pixman is installed as keg-only because apparently Mac OSX (Snow Leopard in this case) already ships with it (or a version of it).

Does this mean that vips will use the system version of pixman? If so, aren't there potential versioning issues related to using the system version rather than the dependency version (assuming they are different)?

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)

For a software to be "keg-only" means it is installed in /usr/local/Cellar but not linked into places like /usr/local/bin, /usr/local/lib, etc. That means other software that depends on it has to be compiled with specific instructions to use the files in /usr/local/Cellar. That's done automatically by brew install when a formula specifies keg-only dependencies.

Formulas that specify keg-only dependencies make sure that the equivalent system libraries are not used. Your installation of vips is linked against a specific version of pixman in /usr/local/Cellar/pixman/<version>, so it isn't affected by the system version of pixman or any other Homebrew versions of pixman you might install.


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to Vigges Developer Community for programmer and developer-Open, Learning and Share
...