https://brew.sh/index_zh-cn.html

macOS 缺失的軟件包的管理器
安裝 Homebrew
將以上命令粘貼至終端。
腳本會(huì)在執(zhí)行前暫停,并說(shuō)明將它將做什么。高級(jí)安裝選項(xiàng)在?這里?(required for Linux and Windows Subsystem for Linux)。
Homebrew 能干什么?
使用 Homebrew 安裝 Apple 沒(méi)有預(yù)裝但?你需要的東西。
$ brew install wget
Homebrew 會(huì)將軟件包安裝到獨(dú)立目錄,并將其文件軟鏈接至?/usr/local?。
$ cd/usr/local$ find CellarCellar/wget/1.16.1Cellar/wget/1.16.1/bin/wgetCellar/wget/1.16.1/share/man/man1/wget.1$ ls-lbinbin/wget -> ../Cellar/wget/1.16.1/bin/wget
Homebrew 不會(huì)將文件安裝到它本身目錄之外,所以您可將 Homebrew 安裝到任意位置。
輕松創(chuàng)建你自己的 Homebrew 包。
$ brew create https://foo.com/bar-1.0.tgzCreated /usr/local/Homebrew/Library/Taps/homebrew/homebrew-core/Formula/bar.rb
完全基于 Git 和 ruby,所以自由修改的同時(shí)你仍可以輕松撤銷(xiāo)你的變更或與上游更新合并。
$ brew edit wget# 使用 $EDITOR 編輯!
Homebrew 的配方都是簡(jiǎn)單的 Ruby 腳本:
classWget<Formulahomepage"https://www.gnu.org/software/wget/"url"https://ftp.gnu.org/gnu/wget/wget-1.15.tar.gz"sha256"52126be8cf1bddd7536886e74c053ad7d0ed2aa89b4b630f76785bac21695fcd"definstallsystem"./configure","--prefix=#{prefix}"system"make","install"endend
Homebrew 使 macOS 更完整。使用?gem?來(lái)安裝 RubyGems、用?brew?來(lái)安裝那些依賴包。
"To install, drag this icon..." no more.?brew cask?installs macOS apps, fonts and plugins and other non-open source software.
$ brew cask install firefox
Making a cask is as simple as creating a formula.
$ brew cask create fooEditing /usr/local/Homebrew/Library/Taps/homebrew/homebrew-cask/Casks/foo.rb
更多文檔
Donate to Homebrew
開(kāi)發(fā)者討論區(qū)
Homebrew 博客
Homebrew Packages
Analytics Data
Homebrew 創(chuàng)建者:Max Howell。 網(wǎng)站搭建者:Rémi Prévost,?Mike McQuaid?和?Danielle Lalonde。?