Mac环境 安装brew
一。brew官网主页上的方法:
/usr/bin/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: Counting objects: 247, done.
remote: Compressing objects: 100% (5/5), done.
remote: Total 247 (delta 196), reused 201 (delta 196), pack-reused 46
Receiving objects: 100% (247/247), 45.99 KiB | 37.00 KiB/s, done.
Resolving deltas: 100% (204/204), completed with 71 local objects.
From https://github.com/Homebrew/brew
96eb404af..3a99e6464 master -> origin/master
HEAD is now at 3a99e6464 Merge pull request #4593 from reitermarkus/curl-options
fatal: unable to access 'https://github.com/Homebrew/brew/': SSLRead() return error -9806
Error: Fetching /usr/local/Homebrew failed!
==> Tapping homebrew/core
Cloning into '/usr/local/Homebrew/Library/Taps/homebrew/homebrew-core'...
fatal: unable to access 'https://github.com/Homebrew/homebrew-core/': SSLRead() return error -9806
Error: Failure while executing; `git clone https://github.com/Homebrew/homebrew-core /usr/local/Homebrew/Library/Taps/homebrew/homebrew-core --depth=1` exited with 128.
Error: Failure while executing; `/usr/local/bin/brew tap homebrew/core` exited with 1.
Failed during: /usr/local/bin/brew update --force
结论:安装失败。
注意:无论翻墙与否都链接不上,只能换方法。
二。使用国内镜像
1. 生成文件
cd ~
curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install >> brew_install
编辑生成的文件brew_install,并且修改2个配置项:
注释掉BREW_REPO = "https://github.com/Homebrew/brew".freeze和CORE_TAP_REPO = "https://github.com/Homebrew/homebrew-core".freeze
修改为BREW_REPO = "git://mirrors.ustc.edu.cn/brew.git".freeze和CORE_TAP_REPO = "git://mirrors.ustc.edu.cn/homebrew-core.git".freeze
2. 执行安装
/usr/bin/ruby ~/brew_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...
HEAD is now at 3a99e6464 Merge pull request #4593 from reitermarkus/curl-options
==> Tapping homebrew/core
Cloning into '/usr/local/Homebrew/Library/Taps/homebrew/homebrew-core'...
remote: Counting objects: 4808, done.
remote: Compressing objects: 100% (4601/4601), done.
remote: Total 4808 (delta 60), reused 568 (delta 16), pack-reused 0
Receiving objects: 100% (4808/4808), 3.89 MiB | 107.00 KiB/s, done.
Resolving deltas: 100% (60/60), done.
Tapped 2 commands and 4593 formulae (4,849 files, 12.2MB).
==> Cleaning up /Library/Caches/Homebrew...
==> Migrating /Library/Caches/Homebrew to /Users/jsecode/Library/Caches/Homebrew...
==> Deleting /Library/Caches/Homebrew...
Already up-to-date.
==> Installation successful!
==> Homebrew has enabled anonymous aggregate user behaviour analytics.
Read the analytics documentation (and how to opt-out) here:
https://docs.brew.sh/Analytics.html
==> Next steps:
- Run `brew help` to get started
- Further documentation:
https://docs.brew.sh
结论:安装成功。
后来在家重新试了下官网方法,又可以安装了。
JSEcodedeMacBook-Pro:nginx shihw$ /usr/bin/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
==> /usr/bin/sudo /bin/mkdir -p /Library/Caches/Homebrew
Password:
==> /usr/bin/sudo /bin/chmod g+rwx /Library/Caches/Homebrew
==> /usr/bin/sudo /usr/sbin/chown shihw /Library/Caches/Homebrew
==> Downloading and installing Homebrew...
remote: Counting objects: 62, done.
remote: Compressing objects: 100% (4/4), done.
remote: Total 62 (delta 48), reused 51 (delta 48), pack-reused 10
Unpacking objects: 100% (62/62), done.
From https://github.com/Homebrew/brew
28fd59672..545eb91c8 master -> origin/master
HEAD is now at 545eb91c8 Merge pull request #4599 from reitermarkus/download-cache-directory
Updated 1 tap (homebrew/core).
==> Cleaning up /Library/Caches/Homebrew...
==> Migrating /Library/Caches/Homebrew to /Users/jsecode/Library/Caches/Homebrew...
==> Deleting /Library/Caches/Homebrew...
==> New Formulae
gptfdisk pijul
==> Updated Formulae
abcde cython emscripten grpc ocrmypdf ripgrep taskell vcftools yarn
awscli dartsim erlang@20 hashcat openshift-cli rust teleport webpack youtube-dl
cargo-completion dbus gammaray knot-resolver paket shibboleth-sp tmux-xpanes wireguard-tools
chronograf dxpy go-statik liquigraph proselint skaffold todolist xml-security-c
==> Installation successful!
==> Homebrew has enabled anonymous aggregate user behaviour analytics.
Read the analytics documentation (and how to opt-out) here:
https://docs.brew.sh/Analytics.html
==> Next steps:
- Run `brew help` to get started
- Further documentation:
https://docs.brew.sh
JSEcodedeMacBook-Pro:nginx shihw$ brew update
Already up-to-date.
JSEcodedeMacBook-Pro:nginx shihw$
Mac环境 安装brew的更多相关文章
- Mac上安装brew
用过ubuntu系统的都知道,上面有一个命令apt-get 很方便可以快速的安装很多软件 特别lamp环境 都是一键安装. 在mac上也有类似的命令 brew brew用法可以访问官网地址 http ...
- MAC下安装Brew[转]
MAC下安装Brew 1.安装XCode xcode-select --install 2.安装HomeBrew ruby -e "$(curl -fsSL https://raw.gith ...
- Appium——appium之mac环境安装
一.安装brew:Homebrew是一款Mac OS平台下的软件包管理工具执行:/usr/bin/ruby -e "$(curl -fsSL https://raw.githubuserco ...
- Mac下安装brew
1.Mac 终端下,执行以下命令,即可安装brew: /usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Hom ...
- Mac上安装brew 包管理工具
Mac 上的包管理工具对于开发者来说是一件非常方便的工具,能够有效的对包进行管理. 所以这篇博客就来简单的讲一下brew 的安装和一些基础命令. brew 全称叫做Homebrew . 1. 首先来说 ...
- mac下安装Brew 警告:Warning: /usr/local/bin is not in your PATH.
终端输入命令 export PATH=/usr/local/bin:$PATH
- Mac环境安装非APP STORE中下载的软件,运行报错:“XXX” is damaged and can’t be opened. You should move it to the Trash. 解决办法
出现这个错误的大多数原因都是因为系统设置的问题,因为系统不信任你从其他地方下载的软件安装包,所以运行时就给你阻止了.具体的设置步骤如下: 1. 打开系统偏好设置 (System Preferences ...
- homebrew & brew cask使用技巧及Mac软件安装
homebrew 安装 /usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/m ...
- Mac环境下升级gcc版本--rocksdb
前言 在mac环境下编译rocksdb,需要配置依赖的编译环境,其中有一项比较麻烦:c++编译要支持C++11,但是在mac环境安装xcode-select --install之后,已经安装有了gcc ...
随机推荐
- Phaser.js之简单的跑酷游戏
采用的物理引擎是Phaser.js 官网地址:http://phaser.io/ 在这里对此引擎不做过多介绍(因为我也是小白,嘿嘿) 效果展示: 源码(详细源码图片资源可点击文章下方或屏幕右上方的gi ...
- maven 继承
一个 maven 项目可以继承另一个 maven 的依赖, 称为子项目 父项目 使用场景: 多个子项目都需要某些依赖, 就可以把子项目共同的依赖抽取到父项目中, 子项目通过继承得到这些依赖, 这样也更 ...
- GIS开发之计算四参数,七参数
一.四参数 想要通过控制点计算四参数,首先需要知道四参数的相关原理,推荐这篇文章: http://www.docin.com/p-1197326043.html 根据上面的计算公式,使用最小二乘法计算 ...
- ThinkPHP框架知识
php框架 一.真实项目开发步骤: 多人同时开发项目,协作开发项目.分工合理.效率有提高(代码风格不一样.分工不好) 测试阶段 上线运行 对项目进行维护.修改.升级(单个人维护项目,十分困难,代码风格 ...
- django 与 Vue 的结合使用说明
1.第一步有一个Django项目 先是创建一个Django项目 django-admin startproject demo 然后创建一个application应用 python manage.py ...
- springboot 学习之路 7(静态页面自动生效问题)
目录:[持续更新.....] spring 部分常用注解 spring boot 学习之路1(简单入门) spring boot 学习之路2(注解介绍) spring boot 学习之路3( 集成my ...
- MongoDB 安装与配置
MongoDB下载 官方下载链接:https://www.mongodb.com/download-center/community MongoDB安装 简单,按提示安装即可.安装方式: 1. Com ...
- 产品经理说|AIOps 让告警管理变得更智能
AIOps 人工智能和IT运营支撑 Ops 之间的故事,愈演愈烈,已经成为当今运维圈的热门话题,我打算从2篇文档分享我们在 AIOps 上一些探索和实践.(本篇)为什么事件(告警)处理需要 AIOps ...
- SQL中常用字符串函数
--CHARINDEX 返回指定字符的位置--2个参数,第一个是要查找的字符串 第二个参数:要搜索的字符串 参数3:开始查找的位置--查找位置从1开始,返回结果为0时表示为结果为空 SELECT CH ...
- 区块链会与io域名有什么关系
为什么区块链会与io域名有这么大的联系? 近几年,区块链成为各国央行到国内外各大商业银行.联合国.国际货币基金组织到许多国家政府研究机构讨论的热点,"区块链+"应用创新正在成为引领 ...