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. C++中的fstream,ifstream,oftream

    https://blog.csdn.net/kingstar158/article/details/6859379 先mark一个大佬的随笔,有时间再回头看 总结: 使用ifstream和ofstre ...

  2. PAT 1011 A+B和C (15)(C++&JAVA&Python)

    1011 A+B和C (15)(15 分) 给定区间[-2^31^, 2^31^]内的3个整数A.B和C,请判断A+B是否大于C. 输入格式: 输入第1行给出正整数T(<=10),是测试用例的个 ...

  3. soapui groovy脚本汇总

    出处:https://www.jianshu.com/p/ce6f8a1f66f4 一.一些内部元件的访问 testRunner.testCase开头 1.向下访问 testRunner.testCa ...

  4. Python编程笔记(第三篇)【补充】三元运算、文件处理、检测文件编码、递归、斐波那契数列、名称空间、作用域、生成器

    一.三元运算 三元运算又称三目运算,是对简单的条件语句的简写,如: 简单条件处理: if 条件成立: val = 1 else: val = 2 改成三元运算 val = 1 if 条件成立 else ...

  5. 繁体简体转化_langconv.py

    from copy import deepcopyimport re try: import psyco psyco.full()except: pass try: from zh_wiki impo ...

  6. java数组元素倒置

    package dataStructure; import java.util.Arrays; import java.util.ArrayList; public class Test1 { sta ...

  7. hibernate项目

    http://blog.csdn.net/wzygis/article/details/22985751

  8. C++中栈和队列的基本操作

    栈操作: s.push(item)    // 将item压入栈中 s.pop()            // 删除栈顶元素,不返回值 s.top()             // 读取栈顶元素,返回 ...

  9. Conda下安装libsvm

    如何在canda下安装libsvm? 版本:Python是2.7 canda2 首先想到的是去Python官网上找libsvm的包,结果并没有. 这是因为libsvm是c语言编写的并不是一个Pytho ...

  10. 2019.02.09 bzoj2440: [中山市选2011]完全平方数(二分答案+容斥原理)

    传送门 题意简述:qqq次询问(q≤500)(q\le500)(q≤500),每次问第kkk个不被除111以外的完全平方数整除的数是多少(k≤1e9)(k\le1e9)(k≤1e9). 思路:考虑二分 ...