Homebrew简称brew,OSX上的软件包管理工具,在Mac终端可以通过brew安装、更新、卸载软件。

1、打开终端直接输入下面指令回车:

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

注意:如果当前的用户是管理员,需要对权限进行许可,在执行上面的指令前先执行:sudo chmod -R g+w /usr/local

2、在1中指令回车后会提示“Press RETURN to continue or any other key to abort”(回车继续或者按其他键终止),这是直接回车进入“Downloading and installing Homebrew...”,如果网络不好的话可能会提示“fatal: unable to access 'https://github.com/Homebrew/brew/': SSLRead() return error -9806...等”,没关系重新输入1的指令更新。

3、更新完成后的提示如下图所示:

4、常用的三条语句搜索(search)、更新(install)、卸载(remove)

搜索:brew search SoftwareName

更新:brew install SoftwareName

卸载:brew remove SoftwareName

(SoftwareName 是你需要处理的软件名)

5、下面是我安装时的过程代码(仅供参考):

Last login: Wed May 10 08:44:45 on console
userdeMacBook-Pro:~ lijinkui$ sudo chmod -R g+w /usr/local
Password:
userdeMacBook-Pro:~ lijinkui$ ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
==> This script will install:
/usr/local/bin/brew
/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
/usr/local/Homebrew
==> The following existing directories will be made writable by user only:
/usr/local/share/zsh
/usr/local/share/zsh/site-functions

Press RETURN to continue or any other key to abort
==> /usr/bin/sudo /bin/chmod u+rwx /usr/local/share/zsh /usr/local/share/zsh/site-functions
==> /usr/bin/sudo /bin/chmod 755 /usr/local/share/zsh /usr/local/share/zsh/site-functions
==> Downloading and installing Homebrew...
fatal: unable to access 'https://github.com/Homebrew/brew/': SSLRead() return error -9806
Failed during: git fetch origin master:refs/remotes/origin/master --tags --force --depth=1
userdeMacBook-Pro:~ lijinkui$ ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
==> This script will install:
/usr/local/bin/brew
/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
/usr/local/Homebrew

Press RETURN to continue or any other key to abort
==> Downloading and installing Homebrew...
remote: Total 0 (delta 0), reused 0 (delta 0), pack-reused 0
HEAD is now at f1d4c4b Merge pull request #2607 from MikeMcQuaid/travis-ci-tweaks-2
==> Tapping homebrew/core
Cloning into '/usr/local/Homebrew/Library/Taps/homebrew/homebrew-core'...
remote: Counting objects: 4408, done.
remote: Compressing objects: 100% (4213/4213), done.
remote: Total 4408 (delta 37), reused 454 (delta 15), pack-reused 0
Receiving objects: 100% (4408/4408), 3.52 MiB | 298.00 KiB/s, done.
Resolving deltas: 100% (37/37), done.
Tapped 4213 formulae (4,451 files, 11MB)
==> Cleaning up /Library/Caches/Homebrew...
==> Migrating /Library/Caches/Homebrew to /Users/lijinkui/Library/Caches/Homebre
==> Deleting /Library/Caches/Homebrew...
Already up-to-date.
Error: Could not link:
/usr/local/share/man/man1/brew.1

Please delete these paths and run `brew update`.
Error: Could not link:
/usr/local/share/doc/homebrew

Please delete these paths and run `brew update`.
==> Installation successful!

==> Homebrew has enabled anonymous aggregate user behaviour analytics.
Read the analytics documentation (and how to opt-out) here:
  http://docs.brew.sh/Analytics.html

==> Next steps:
- Run `brew help` to get started
- Further documentation: 
    http://docs.brew.sh
userdeMacBook-Pro:~ lijinkui$ brew update
Already up-to-date.

Mac使用终端安装Homebrew(brew)的更多相关文章

  1. 【转】Mac系统中安装homebrew(类似redhat|Centos中的yum;类似Ubuntu中的apt-get)

    Homebrew,Homebrew简称brew,是Mac OSX上的软件包管理工具,能在Mac中方便的安装软件或者卸载软件,可以说Homebrew就是mac下的apt-get.yum神器 Homebr ...

  2. mac下高效安装 homebrew 及完美避坑姿势 (亲测有效)

    世上无难事,只要找到 Homebrew 的正确安装方式. Homebrew 是什么 Homebrew是 mac的包管理器,仅需执行相应的命令,就能下载安装需要的软件包,可以省掉自己去下载.解压.拖拽( ...

  3. Mac系统下安装Homebrew后无法使用brew命令

    打开终端输入 brew提示:command not found 解决方法 输入命令: sudo vim .bash_profile 然后输入以下代码: export PATH=/usr/local/b ...

  4. Mac系统下安装Homebrew后无法使用brew命令,-bash: brew: command not found

    使用如下命令: sudo vim .bash_profile 然后输入以下代码: export PATH=/usr/local/bin:$PATH 再使用以下命令使配置生效: source .bash ...

  5. mac下的安装神奇 brew --例子 安装 mysql

    da打开终端 输入bre 输入 bre search mysql (查找mysql版本) 输入 bre install mysql@5.6(选择mysql版本安装)

  6. Mac上面不能安装Homebrew

    这个stackoverflow的答案解决了我的问题: http://stackoverflow.com/questions/18039029/mac-can-t-install-homebrew 问题 ...

  7. Mac 10.12安装Homebrew图形化界面管理工具Cakebrew

    下载: (链接: https://pan.baidu.com/s/1mivJ9H2 密码: f8dr)

  8. Mac 终端下Homebrew的几个常用命令(新手笔记)

    最近在研究用appium来做IOS的自动化,所以开始接触Mac系统.记录一下在Mac的终端下Homebrew的几个常用命令 安装(需要 Ruby,不过一般自带都有):ruby -e "$(c ...

  9. Mac安装homebrew,postman,charles

    Homebrew是一款Mac OS平台下的软件包管理工具,拥有安装.卸载.更新.查看.搜索等很多实用的功能.简单的一条指令,就可以实现包管理,而不用你关心各种依赖和文件路径的情况,十分方便快捷. 1. ...

随机推荐

  1. auth 认证模块

    . auth认证模块: http://www.cnblogs.com/liwenzhou/p/9030211.html auth模块的知识点: . 创建超级用户 python manage.py cr ...

  2. 转 C++函数返回值,你必须注意的问题

    归根结底,C++所面临的问题要求它提供各种各样的机制以保证性能,也许,这辈子也见不到C++能安全有效的自己进行内存垃圾回收..... 老程序猿都会提醒菜鸟,注意函数的返回值,因为,很可能,你的函数返回 ...

  3. Eigen解线性方程组

    一. 矩阵分解: 矩阵分解 (decomposition, factorization)是将矩阵拆解为数个矩阵的乘积,可分为三角分解.满秩分解.QR分解.Jordan分解和SVD(奇异值)分解等,常见 ...

  4. 常用的TCP Option

    当前,TCP常用的Option如下所示———— Kind (Type) Length Name Reference 描述 & 用途 0 1 EOL RFC 793 选项列表结束 1 1 NOP ...

  5. Contest with Drinks Easy

    /* Problem Statement Joisino is about to compete in the final round of a certain programming competi ...

  6. VS2010配置OpenGL开发环境

    OpenGL(Open Graphics Library)是一个跨编程语言.跨平台的专业图形程序接口.OpenGL是SGI公司开发的一套计算机图形处理系统,是图形硬件的软件接口,任何一个OpenGL应 ...

  7. dirname(__FILE__)

  8. mybatis 插入数据并返回主键值

    <insert id="insert" parameterType="com.pojo.TSubject" useGeneratedKeys=" ...

  9. nginx的hash

    hash结构中有若干个桶,桶内是hash(key)值相同的若干数据. 查找数据时,首先对key值进行hash计算,然后hash值对桶的个数进行求余,得到数据所在的桶.然后在桶中使用key逐个查找,直到 ...

  10. IOS初级:UIAlertController

    - (IBAction)signOutAction:(id)sender { //初始化,StyleActionSheet是对话框的样式 UIAlertController *alert = [UIA ...