MacBook(macOS) 如何安装 Homebrew Cask(作废)
文章目錄
- 重要通知(不要再去安裝 Homebrew Cask 了)
- Homebrew Cask 簡介
- 相關文件和目錄
- Homebrew Cask 安裝
- 使用命令下載安裝
- 直接從官網下載安裝包
- 利用國內源手動 clone下載(推薦)
- Homebrew Cask 換源
重要通知(不要再去安裝 Homebrew Cask 了)
To start using Homebrew Cask, you just need Homebrew installed.
Homebrew Cask is implemented as part of Homebrew. All Homebrew Cask commands begin with brew, which works for both Casks and Formulae. The most frequently-used commands are:
1.install — installs the given Cask
2.uninstall — uninstalls the given Cask
3.reinstall — reinstalls the given Cask
4.list --casks — lists installed Casks
Homebrew Cask 不需要再單獨安裝了,新版的 Homebrew 已經整合了 Cask 全部的功能,不僅如此,在安裝 Cask 時,也不再需要使用類似 brew cask 這樣命令,一律使用命令 brew 即可,理解下面這句話:
All Homebrew Cask commands begin with brew, which works for both Casks and Formulae.
Homebrew Cask 的項目主頁地址:https://github.com/Homebrew/homebrew-cask
How to Use Homebrew Cask:https://github.com/Homebrew/homebrew-cask/blob/master/USAGE.md#how-to-use-homebrew-cask
Homebrew Cask 簡介
“To install, drag this icon…” no more!
Homebrew Cask extends Homebrew and brings its elegance, simplicity, and speed to the installation and management of GUI macOS applications such as Atom and Google Chrome.
We do this by providing a friendly CLI workflow for the administration of macOS applications distributed as binaries.
Homebrew Cask 相當于 Homebrew 的擴展,區別在于,brew 命令首先獲取程序源碼然后編譯安裝(包括依賴庫),并自動做好必要的配置(如環境變量等);而 brew cask 命令是下載已經編譯好的軟件包并放在統一的目錄中。
brew cask 命令用來安裝 Mac 上的 Gui 程序應用包(.dmg 或 .pkg),比如 qq、chrome 等。它先下載解壓軟件包到統一的目錄中(/opt/Homebrew Cask/Caskroom),省掉了自己去下載、解壓、拖拽(安裝)等步驟。然后再軟鏈到 ~/Applications/ 目錄下, 非常方便,而且還包含很多在 AppStore 里沒有的常用軟件。
相關文件和目錄
Homebrew Cask 是將應用程序放置在 /opt/Homebrew Cask/Caskroom/ 下,會在你的家目錄中的『應用程序』文件夾中創建一個類似快捷方式的替身。
Homebrew Cask 安裝
使用命令下載安裝
liaowenxiongdeMacBook-Air:~ liaowenxiong$ brew tap phinze/Homebrew Cask && brew install brew-cask Updating Homebrew... Error: phinze/cask was moved. Tap homebrew/cask instead.+++++++++++++++++++++++++++++++++liaowenxiongdeMacBook-Air:~ liaowenxiong$ brew tap homebrew/cask && brew install brew-cask Warning: No available formula or cask with the name "brew-cask". Did you mean brew-pip? ==> Searching for similarly named formulae... These similarly named formulae were found: brew-cask-completion ? brew-pip To install one of them, run (for example):brew install brew-cask-completion ? ==> Searching for a previously deleted formula (in the last month)... Error: No previously deleted formula found. ==> Searching taps on GitHub... Error: No formulae found in taps. liaowenxiongdeMacBook-Air:~ liaowenxiong$ brew cask search chrome Error: Unknown command: cask liaowenxiongdeMacBook-Air:~ liaowenxiong$ brew -cask search chrome Error: Unknown command: -cask liaowenxiongdeMacBook-Air:~ liaowenxiong$ brew --cask search chrome Error: Unknown command: --cask++++++++++++++++++++liaowenxiongdeMacBook-Air:~ liaowenxiong$ brew install caskroom/cask/brew-cask Error: caskroom/cask was moved. Tap homebrew/cask instead.++++++++++++++++++liaowenxiongdeMacBook-Air:~ liaowenxiong$ brew tap caskroom/cask && brew install brew-cask Error: caskroom/cask was moved. Tap homebrew/cask instead.直接從官網下載安裝包
利用官網文件安裝
利用國內源手動 clone下載(推薦)
Homebrew Cask 換源
cd "$(brew --repo)/Library/Taps/homebrew/Homebrew Cask" git remote set-url origin https://mirrors.ustc.edu.cn/Homebrew Cask.git git -C "$(brew --repo homebrew/cask)" remote set-url origin https://mirrors.ustc.edu.cn/Homebrew Cask.git總結
以上是生活随笔為你收集整理的MacBook(macOS) 如何安装 Homebrew Cask(作废)的全部內容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: MacOS 的软件包管理工具 HomeB
- 下一篇: 美式英语中 [d] 的特别发音