← 返回命令列表

Linux command

brew-install 命令

文本

复制后可按需替换文件名、目录或参数。

常用示例

Install a formula

brew install [formula]

Install a cask

brew install --cask [cask]

Install without upgrading existing version

HOMEBREW_NO_INSTALL_UPGRADE=1 brew install [formula]

Install with debug session on failure

brew install --debug [formula]

Force install without checking existing versions

brew install --force [formula]

Install and display install times

brew install --display-times [formula]

说明

brew install installs a formula or cask. If the formula is already installed but outdated, it will be upgraded unless HOMEBREW_NO_INSTALL_UPGRADE is set. After installation, cleanup runs automatically for installed formulae or every 30 days for all formulae unless HOMEBREW_NO_INSTALL_CLEANUP is set.

参数

--cask
Treat all arguments as casks
--formula
Treat all arguments as formulae
--force
Install without checking for previously installed keg-only or non-migrated versions
--debug
Open interactive debugging session if brewing fails
--display-times
Print install times for each package
--verbose
Print detailed build information
--build-from-source
Compile formula from source instead of using bottle
--force-bottle
Install from bottle even if it would not normally be used
--include-test
Install test dependencies

FAQ

What is the brew-install command used for?

brew install installs a formula or cask. If the formula is already installed but outdated, it will be upgraded unless HOMEBREW_NO_INSTALL_UPGRADE is set. After installation, cleanup runs automatically for installed formulae or every 30 days for all formulae unless HOMEBREW_NO_INSTALL_CLEANUP is set.

How do I run a basic brew-install example?

Run `brew install [formula]` in a terminal, then adjust file names, paths, flags, or remote targets for your system.

What does --cask do in brew-install?

Treat all arguments as casks