有时我看到一些文章说,在brew安装一些东西之前,要使用命令。我想知道tap是什么意思?为什么我必须在安装之前运行tap ?


当前回答

tap命令允许Homebrew进入另一个公式存储库。一旦您完成了这些操作,您就扩展了可安装软件的选项。

这些额外的Git repo(在/usr/local/Homebrew/Library/Taps内)描述了可用于安装的包公式集。

如。

brew tap                     # list tapped repositories
brew tap <tapname>           # add tap
brew untap <tapname>         # remove a tap

其他回答

家酿的术语:

package ≡ formula ≡ ruby file: this typically deals with command line (CLI) software bottle: binary program already built for some OS (macOS montery, macOS big_sur, arm64_monterey, arm64_big_sur, catalina, x86_64_linux) (configurations and make is already done) casks: GUI program or font; this is an extension of homebrew that allows us to install MacOS native applications like: Google Chrome (brew cask install google-chrome), iTerm (" " iterm2), Visual Studio Code (" " visual-studio-code), etc. As well as install fonts: Roboto[ Mono] (" " font-roboto/" " font-roboto-mono), Latin Modern (" " font-latin-modern), etc. taps: [Github|Gitlab|...] repositories containing additional [formulas for downloading] packages that are not standard, i.e not incorporated into the official homebrew repository containing all [formulas for downloadable] packages. "taps" allow you to extend the list of packages that you can install via homebrew. by "tapping" a repository you download (literally git clone) the repository locally. the repository wil contain ruby files (formulas) that tell homebrew how to download, configure, build, install, etc, an additional list of packages. then when you do brew install X, brew will scan through the official/standard homebrew repositories that you have locally, won't find a formula for X, then it will scan through your "taps" and if it finds a formula for X, will run it (the formula is a ruby file).


包被安装到/usr/local/Cellar/<package>,符号链接到/usr/local/bin和/usr/local/lib等。 自制核心回购公式: 下载到/usr/local/ homebrew/ library / tap/ homebrew/homebrew-core/formula


你可以在https://formulae.brew.sh/上找到任何包

tap命令允许Homebrew进入另一个公式存储库。一旦您完成了这些操作,您就扩展了可安装软件的选项。

这些额外的Git repo(在/usr/local/Homebrew/Library/Taps内)描述了可用于安装的包公式集。

如。

brew tap                     # list tapped repositories
brew tap <tapname>           # add tap
brew untap <tapname>         # remove a tap

Brew tap将更多回购添加到Brew跟踪、更新和安装的公式列表中

Brew tap <user>/<repo>在https://github.com/user/homebrew-repo上对存储库进行浅克隆。注意,brew tap在repo名称前面加上了“homebrew-”。在此之后,brew将能够处理这些公式,就像它们在Homebrew的规范存储库中一样

完整的文档可以在这里找到所有可用的选项。