安裝 Homebrew

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





Homebrew

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

更多文檔

docs.brew.sh

Donate to Homebrew

Homebrew/brew#donations

開(kāi)發(fā)者討論區(qū)

discourse.brew.sh

Homebrew 博客

brew.sh/blog

Homebrew Packages

formulae.brew.sh

Analytics Data

formulae.brew.sh/analytics

Homebrew 創(chuàng)建者:Max Howell。 網(wǎng)站搭建者:Rémi Prévost,?Mike McQuaid?和?Danielle Lalonde。?

?著作權(quán)歸作者所有,轉(zhuǎn)載或內(nèi)容合作請(qǐng)聯(lián)系作者
【社區(qū)內(nèi)容提示】社區(qū)部分內(nèi)容疑似由AI輔助生成,瀏覽時(shí)請(qǐng)結(jié)合常識(shí)與多方信息審慎甄別。
平臺(tái)聲明:文章內(nèi)容(如有圖片或視頻亦包括在內(nèi))由作者上傳并發(fā)布,文章內(nèi)容僅代表作者本人觀點(diǎn),簡(jiǎn)書(shū)系信息發(fā)布平臺(tái),僅提供信息存儲(chǔ)服務(wù)。

相關(guān)閱讀更多精彩內(nèi)容

友情鏈接更多精彩內(nèi)容