1. 程式人生 > >Mac安裝homebrew

Mac安裝homebrew

object share dmi lin nload ron pro 終端 ret

Homebrew官網 http://brew.sh/index_zh-cn.html

Homebrew是神馬

linux系統有個讓人蛋疼的通病,軟件包依賴,好在當前主流的兩大發行版本都自帶了解決方案,Red hat有yum,Ubuntu有apt-get

神馬,你用mac os,不好意Mac os木有類似的東東,淚奔中幾經折騰總算找到了第三方支持:Homebrew,Homebrew簡稱brew,是Mac OSX上的軟件包管理工具,能在Mac中方便的安裝軟件或者卸載軟件,可以說Homebrew就是mac下的apt-get、yum神器

Homebrew安裝

Homebrew的安裝非常簡單,打開終端復制、粘貼以下命令,回車,搞定(請放心使用,原汁原味的官方安裝方法搬運)

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

Homebrew使用

Homebrew使用沒啥好說的了,常用的

搜索軟件:brew search 軟件名,如brew search wget

安裝軟件:brew install 軟件名,如brew install wget

卸載軟件:brew remove 軟件名,如brew remove wget centlingdeMacBook-Pro:openssl-1.0.2g centling$ ruby -e "$(curl -fsSLhttps://raw.githubusercontent.com/Homebrew/install/master/install)" ==>
This script will install:
/usr/local/bin/brew
/usr/local/Library/...
/usr/local/share/doc/homebrew
/usr/local/share/man/man1/brew.1
/usr/local/share/zsh/site-functions/_brew
/usr/local/etc/bash_completion.d/brew

Press RETURN to continue or any other key to abort
==> /usr/bin/sudo /bin/mkdir /usr/local
==> /usr/bin/sudo /bin/chmod g+rwx /usr/local

==> /usr/bin/sudo /usr/sbin/chown centling:admin /usr/local
==> /usr/bin/sudo /bin/mkdir /Library/Caches/Homebrew
==> /usr/bin/sudo /bin/chmod g+rwx /Library/Caches/Homebrew
==> /usr/bin/sudo /usr/sbin/chown centling /Library/Caches/Homebrew
==> Downloading and installing Homebrew...
remote: Counting objects: 458, done.
remote: Compressing objects: 100% (416/416), done.
remote: Total 458 (delta 28), reused 277 (delta 17), pack-reused 0
Receiving objects: 100% (458/458), 701.87 KiB | 116.00 KiB/s, done.
Resolving deltas: 100% (28/28), done.
From https://github.com/Homebrew/brew
* [new branch] master -> origin/master
HEAD is now at 496fff6 doco: more updates for core/formula separation
==> Tapping homebrew/core
Cloning into ‘/usr/local/Library/Taps/homebrew/homebrew-core‘...
remote: Counting objects: 3660, done.
remote: Compressing objects: 100% (3545/3545), done.
remote: Total 3660 (delta 17), reused 425 (delta 3), pack-reused 0
Receiving objects: 100% (3660/3660), 2.75 MiB | 375.00 KiB/s, done.
Resolving deltas: 100% (17/17), done.
Checking connectivity... done.
Tapped 3535 formulae (3,686 files, 8.6M)
==> Installation successful!
==> Next steps
Run `brew help` to get started centlingdeMacBook-Pro:openssl-1.0.2g centling$

Mac安裝homebrew