Mac上Homebrew的使用 (Homebrew 使 OS X 更完整)

本文介绍了Homebrew,一个使OS X更完整的工具,用于安装Apple未提供的软件。详细讲述了Homebrew的安装、使用方法,以及解决常见问题,如软件冲突、更新和卸载,帮助用户更好地管理和维护Mac上的软件。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

2014-02-22 wcdj


0 Homebrew是啥?

“Homebrew installs the stuff you need that Apple didn’t.——Homebrew 使 OS X 更完整”

Homebrew的官网[1](多语言版本)简单明了地介绍了如何安装和使用这个工具,并提供了自己的Wiki。


1 安装Homebrew

brew的安装很简单,使用一条ruby命令即可,Mac系统上已经默认安装了ruby。

gerryyang@mba:bin$ruby --version
ruby 2.0.0p247 (2013-06-27 revision 41674) [universal.x86_64-darwin13]

关于安装brew的详细说明可以参考其github上的wiki说明[2]

"
Installation

The suggested and easiest way to install Homebrew is on the homepage. We don’t duplicate it here because it is asecurity risk to list it on a user-editable wiki.

The standard script installs Homebrew to /usr/local so that you don’t need sudo when youbrew install. It is acareful script, it can be run even if you have stuff installed to/usr/local already. It tells you exactly what it will do before it does it too. And you have to confirm everything it will do before it starts.

There are other ways to install Homebrew which provide you with more flexibility. They are listed below the requirements.

"
gerryyang@mba:~$ruby -e "$(curl -fsSL https://raw.github.com/Homebrew/homebrew/go/install)"
It appears Homebrew is already installed. If your intent is to reinstall you
should do the following before running this installer again:

    rm -rf /usr/local/Cellar /usr/local/.git && brew cleanup

由于我的系统上已经安装过brew,因此再次执行安装命令会提示我brew已经存在。



2 Homebrew的用法

查看brew的具体用法:

gerryyang@mba:~$brew
Example usage:
  brew [info | home | options 
评论 10
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值