【原创】brew 和 brew cask

Homebrew 与 Homebrew-Cask 的关系

  • Remember that Homebrew-Cask is an independent project from Homebrew.
  • Homebrew-Cask is implemented as a subcommand of Homebrew.

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 Google Chrome and Adium.

We do this by providing a friendly Homebrew-style CLI workflow for the administration of macOS applications distributed as binaries.

It’s implemented as a homebrew external command called cask.

To start using Homebrew-Cask, you just need Homebrew installed.

As of December 2015, it is now unnecessary to install cask manually as it is now part of homebrew's installation. So after updating homebrew via brew update, you are set to use brew cask.

Homebrew 介绍(官方主页):

The missing package manager for macOS.

知乎上关于这个问题的讨论:这里。 网友提供的很好的介绍:这里

Homebrew 相关术语

TermDescriptionExample
Formulapackage 定义文件/usr/local/Homebrew/Library/Taps/homebrew/homebrew-core/Formula/foo.rb
KegThe installation prefix of a Formula(可理解成版本号)/usr/local/Cellar/foo/0.1
opt prefixA symlink to the active version of a Keg/usr/local/opt/foo
CellarAll Kegs are installed here/usr/local/Cellar
Tap存放 Formulae 和/或 commands 的其它可选 Git 仓库/usr/local/Homebrew/Library/Taps/homebrew/homebrew-versions
Bottle用于替代源码构建而预先构建好的 Kegqt-4.8.4.mavericks.bottle.tar.gz
Cask用于安装 macOS native apps 的 homebrew 扩展/Applications/MacDown.app/Contents/SharedSupport/bin/macdown
Brew Bundle用于描述依赖关系的 homebrew 扩展brew 'myservice', restart_service: true

提 bug 前的确认工作

在你认为遇到 bug 但找不到解决办法前 make sure you have the latest versions of Homebrew, Homebrew-Cask, and all Taps by running the following commands.

$ cd $(brew --repo); git fetch; git reset --hard origin/master
$ brew untap phinze/cask; brew untap caskroom/cask; brew uninstall --force brew-cask
$ brew cleanup; brew cask cleanup; brew update

补充说明:

$ cd $(brew --repo); git fetch; git reset --hard origin/master`

If Homebrew was updated on Aug 10-11th 2016 and brew update always says Already up-to-date. you need to run these commands above.

brew uninstall --force brew-cask

To uninstall all versions of a Cask, use --force

$ brew cleanup; brew cask cleanup; brew update

cleanup — cleans up cached downloads


提 issue 的套路

Start by searching for your issue before posting a new one. If you find an open issue and have any new information not reported in the original, please add your insights. If you find a closed issue, try the solutions there. If the issue is still not solved, open a new one with your new information and a link back to the old related issue.

转载于:https://my.oschina.net/moooofly/blog/798103

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值