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 ...
随机推荐
- 活字格对接RF手持机与ERP系统,帮助RFID快速盘点方案落地
这个玩意有点意思,要不要搞来玩玩? ----------- 射频技术(RF)是Radio Frequency的缩写,较常见的应用有无线射频识别(Radio Frequency Identificati ...
- button改变某div内文字内容的显示
<!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8&quo ...
- [转] vi/vim命令模式和编辑模式各种操作
摘要:vi 编辑器是最常用的文档创建和编辑工具,初学者应该学会简单应用vi ,学会在vi 中做简单的修改.删除.插入.搜索及替换作业:如果您是新手,不妨看看本文,或许这篇文档能让您在最短的时间内学会v ...
- Android 官方DEMO BasicNetworking
本示例演示如何使用Android API检查网络连接. Demo下载地址:https://github.com/googlesamples/android-BasicNetworking/#readm ...
- 智能POS打印配置&常见问题FAQ 12-14 后期持续更新
1.安卓一体机会员注销钱会不会退回到支付宝 智能pos会员注销钱目前只能现金退还. 2.支付异常订单悬浮球在哪关闭 设置-->功能设置-->系统设置-->开启支付异常订单悬浮球 3. ...
- python里用变量命名改善代码质量
编程时,总会遇到各种各样的变量,取一个好的变量名能够有效提高代码的可读性,而且python是一种,动态类型的语言,良好的变量名,能够在编写代码或者再次阅读代码时提高效率. 1. 变量名不要太宽泛,要有 ...
- pom文件
groupid和artifactId被统称为“坐标”是为了保证项目唯一性而提出的,如果你要把你项目弄到maven本地仓库去,你想要找到你的项目就必须根据这两个id去查找. groupId一般分为多个段 ...
- 文件上传漏洞靶场:upload-labs安装及第一关教程
注:本文仅供学习使用,请勿用于非法操作,后果与作者无关!!! 一.简介 upload-labs是一个使用php语言编写的,专门收集渗透测试过程中遇到的各种上传漏洞的靶场.旨在帮助大家对上传漏洞有一个全 ...
- VMare Workstation 安装Ubuntu 虚拟机教程
1.VMware Workstation,选择左上角文件—新建虚拟机,开始新建一台虚拟机,典型的话许多配置为默认设置,因此,这里我选择自定义安装: 2.机硬件兼容性选择默认即可: 3.客户操作系统选择 ...
- Java入门(四):运算符优先级、关键字与保留字
上次介绍了Java的运算符,今天来介绍下运算符的优先级,以及Java的关键字.保留字. 一.运算符优先级 序号 运算符 名称 目数 结合性 说明 1 [ ] 方括号 从左向右 优先级最高 . 点号 双 ...