mac install brew

Posted yfceshi

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了mac install brew相关的知识,希望对你有一定的参考价值。

近期刚把开发平台从windows迁移到Mac。发现有些东西也是须要依据自己须要安装的。所以搜了下,发现网上各路大神推荐brew,看完介绍,感觉不错,搞起安装(这里说下心得。在Mac app store中有非常多经常使用的软件都找不到,比如大名鼎鼎的eclipse,sublime text等。事实上是个人想的太狭隘了。以为在Mac上的安装的软件都是要从app store中下载,事实上不然,有网友这样说:在Mac app store中公布软件不是不要钱的,开发人员须要花一年几百块去开发软件的,当然。你能够光是开发。仅仅是不能在app store中公布,所以有些人不想公布在app store上,花钱用处不大,还不如直接公布在网上不是更好吗)。


1、Homebrew 是 OS X 的包管理工具,Ruby 社区的作品。功能类似 Ubuntu 下的apt-get



2、在百度搜索时会返回非常多在Mac terminal中安装的脚本。尽管看似都非常相像,但基本上在安装时都会出现错误,可能是在网友在回答后,homebrew官方更新了安装脚本,所以在安装brew时推荐从官方copy安装脚本,官方站点例如以下:http://brew.sh/index_zh-cn.html


3、复制到Mac terminal后,回车安装(重要节点高亮显示):

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

==>This script will install:

/usr/local/bin/brew

/usr/local/Library/...

/usr/local/share/man/man1/brew.1


Press RETURN to continue or any other key to abort

==>Downloading and installing Homebrew...

remote: Counting objects: 3693, done.

remote: Compressing objects: 100% (3525/3525), done.

remote: Total 3693 (delta 38), reused 527 (delta 27), pack-reused 0

Receiving objects: 100% (3693/3693), 3.04 MiB | 79.00 KiB/s, done.

Resolving deltas: 100% (38/38), done.

From https://github.com/Homebrew/homebrew

 * [new branch]      master     -> origin/master

HEAD is now at 9c41fb8 update man page

==>Installation successful!

==> Next steps

Run `brew help` to get started


4、到眼下为止已安装成功homebrew。在terminal中验证一下,输入:brew help

Example usage:

  brew [info | home | options ] [FORMULA...]

  brew install FORMULA...

  brew uninstall FORMULA...

  brew search [foo]

  brew list [FORMULA...]

  brew update

  brew upgrade [FORMULA...]

  brew pin/unpin [FORMULA...]


Troubleshooting:

  brew doctor

  brew install -vd FORMULA

  brew [--env | config]


Brewing:

  brew create [URL [--no-fetch]]

  brew edit [FORMULA...]

  https://github.com/Homebrew/homebrew/blob/master/share/doc/homebrew/Formula-Cookbook.md


Further help:

  man brew

  brew home


安装成功。收工~


以上是关于mac install brew的主要内容,如果未能解决你的问题,请参考以下文章

Mac OSX系统 openEXR安装

Mac用brew安装MySQL

Mac中Eclipse安装和使用svn

利用brew在mac上安装mysql

Mac软件安装 homebrew & brew cask使用技巧

Mac下 homebrew 安装mysql