brew install XXX和brew cask install XXX有什么区别 [英] What is the difference between brew install XXX and brew cask install XXX
问题描述
我已经熟悉了整个自制程序套件,并且文档非常差.什么是酒桶,酒窖和水龙头?
I'm familiarizing myself with the whole homebrew kit and the documentation is rather poor. What is a cask, Cellar and a tap?
推荐答案
Homebrew-Cask 是对自制程序以安装GUI应用程序,例如Google Chrome或Atom.它独立开始,但其维护人员现在与Homebrew的核心团队紧密合作.
Homebrew-Cask is an extension to Homebrew to install GUI applications such as Google Chrome or Atom. It started independently but its maintainers now work closely with Homebrew’s core team.
Homebrew将其程序包定义文件称为"formulae"(英国复数形式为"formula").自制酒桶称它们为酒桶".桶就像公式一样,是用基于Ruby的 DSL 编写的文件,介绍如何安装东西.
Homebrew calls its package definition files "formulae" (British plural for "formula"). Homebrew-Cask calls them "casks". A cask, just like a formula, is a file written in a Ruby-based DSL that describes how to install something.
酒窖是Homebrew用来安装东西的地方.它的默认路径是/usr/local/Cellar
.然后将来自标准位置的符号链接添加到它.
The Cellar is where Homebrew installs things. Its default path is /usr/local/Cellar
. It then add symlinks from standard locations to it.
例如,当您键入 brewinstallgit
时:
- Homebrew将其安装在
/usr/local/Cellar下的
/usr/local/Cellar/git/< version>/
下/git/< version>/bin/git - 它将从
/usr/local/bin/git
的符号链接添加到该二进制文件
- Homebrew installs it under
/usr/local/Cellar/git/<version>/
, with thegit
binary in/usr/local/Cellar/git/<version>/bin/git
- It adds a symlink from
/usr/local/bin/git
to that binary
这使Homebrew可以跟踪Homebrew安装的软件与其他装置安装的软件.
This allows Homebrew to keep track of what’s installed by Homebrew versus software installed by other means.
点击
是公式的来源.默认值为 homebrew/core
,但是您可以添加更多它们.为您自己的软件创建公式的最简单方法是创建一个名为 homebrew-< something>
的GitHub存储库;将您的公式文件放入其中;然后键入 brew tap< username>/< something>
将此新的公式源添加到Homebrew安装中,从而可以访问其所有公式.
A tap
is a source of formulae. The default is homebrew/core
but you can add more of them. The simplest way to create a formula for your own software is to create a GitHub repository called homebrew-<something>
; put your formula file in it; then type brew tap <username>/<something>
to add this new source of formulae to your Homebrew installation and so get access to all its formulae.
一些公司为自己的公用事业使用内部自制的水龙头.对于Atlassian软件,有很多公共水龙头,例如 atlassian/tap
,或 ska-sa/tap
用于射电天文学.Homebrew本身曾经有其他附加功能,例如 homebrew/science
,但他们已弃用它们,并将公式导入到 homebrew/core
中.
Some companies have internal Homebrew taps for their own utilities. There are a lot of public taps like atlassian/tap
for Atlassian software, or ska-sa/tap
for radio astronomy. Homebrew itself used to have additional taps like homebrew/science
but they deprecated them and imported the formulæ in homebrew/core
.
这篇关于brew install XXX和brew cask install XXX有什么区别的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!