Homebrew

Homebrew官方网站内容

http://brew.sh/

  • 1.
    Homebrew
    OS X 不可或缺的套件管理器

  • 2.
    Homebrew 会将套件安装到独立目录/usr/local/Cellar,并将文件软链接至 /usr/local 。

$ brew install wget

$ cd /usr/local

$ find Cellar
Cellar/wget/1.16.1
Cellar/wget/1.16.1/bin/wget
Cellar/wget/1.16.1/share/man/man1/wget.1

$ ls -l bin
bin/wget -> ../Cellar/wget/1.16.1/bin/wget

  • 3.
    Homebrew 的所有文件均会被安装到预定义目录下,所以您无需担心 Homebrew 的安装位置。
Mac安装Homebrew

http://www.cnblogs.com/liulipeng/p/3938518.html

  • 1.安装命令如下:
    curl -LsSf http://github.com/mxcl/homebrew/tarball/master | sudo tar xvz -C/usr/local –strip 1

  • 2.当brew安装成功后,就可以随意安装自己想要的软件了,例如wget,命令如下:
    sudo brew install wget

  • 3.卸载的话,命令如下:
    sudo brew uninstall wget

  • 4.查看安装软件的话,命令如下:
    sudo brew search /apache*/

注意/apache*/是使用的正则表达式,用/分割。

Homebrew更新本地已安装的package

Mac上Homebrew的使用 (Homebrew 使 OS X 更完整)
http://blog.csdn.net/delphiwcdj/article/details/19679891

  • 第一步:先更新brew:
    brew update

  • 第二步:更新所有package:
    brew upgarde

// 很多blog提供的Homebrew的安装命令失效,出现更新了;
rubye" (curl -fsSL https://raw.github.com/Homebrew/homebrew/go/install)”

Whoops, the Homebrew installer has moved! Please instead run:

ruby -e “$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)”

Also, please ask wherever you got this link from to update it to the above.
Thanks!

rubye" (curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/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

// 已经安装了Homebrew,可以卸载;这是卸载命令;
// 看到Homebrew会将套件安装到独立目录/usr/local/Cellar;
$ rm -rf /usr/local/Cellar /usr/local/.git && brew cleanup

// 获取Homebrew命令
rubye" (curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)”

// 安装wget出错,因为被墙了啊,可以借助vpn安装;
$ brew install wget
==> Installing wget dependency: openssl
==> Downloading https://homebrew.bintray.com/bottles/openssl-1.0.2a-1.mavericks.

curl: (6) Could not resolve host: homebrew.bintray.com
Error: Failed to download resource “openssl”
Download failed: https://homebrew.bintray.com/bottles/openssl-1.0.2a-1.mavericks.bottle.tar.gz
Warning: Bottle installation failed: building from source.
Error: /usr/local/opt/makedepend not present or broken
Please reinstall makedepend. Sorry :(

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值