了解自制和仅桶依赖

了解自制和仅桶依赖

本文介绍了了解自制和仅桶依赖的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我最近开始使用自制软件,当我将某些东西酿造到系统上时,我有点困惑,但是酿造的依赖项仅是小桶的,这意味着它们是在/usr/local下链接的. /p>

例如,我要安装vips(图像处理库). pixman是其众多依赖项之一. Pixman只能以桶装方式安装,因为显然Mac OSX(在这种情况下为Snow Leopard)已随它(或它的一个版本)一起提供.

这是否意味着vips将使用pixman的系统版本?如果是这样,那么是否存在与使用系统版本而不是依赖版本有关的潜在版本控制问题(假设它们是不同的)?

解决方案

要使软件仅支持抽动",则意味着该软件已安装在/usr/local/Cellar中,但不是链接到了,/usr/local/lib等.这意味着必须使用特定的指令编译依赖于它的其他软件,才能使用/usr/local/Cellar中的文件.当公式指定仅桶依赖项时,这会由brew install自动完成.

指定仅桶依赖项的公式可确保不使用等效的系统库.您安装的vips与/usr/local/Cellar/pixman/<version>中特定版本的pixman链接,因此不受系统版本的pixman或您可能安装的任何其他Homebrew pixman版本的影响.

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)?

解决方案

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.

这篇关于了解自制和仅桶依赖的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

08-24 03:54