• 解决macos 安装homebrew速度慢(转)


    问题描述

    安装的homebrew的时候下载速度超级慢,解决办法是更换homebrew的下载源

    操作步骤

    1.用safari打开“https://raw.githubusercontent.com/Homebrew/install/master/install.sh”,把里面的文本复制下来,在桌面创建文本文件“brew_install”,粘贴.

    2.搜索:

    BREW_REPO="https://github.com/Homebrew/brew"

    替换成:

    BREW_REPO="https://mirrors.ustc.edu.cn/brew.git"

    保存.

    3.打开terminal,运行命令:/bin/bash + 刚才的brew_install文件,比如:

    /bin/bash /Users/admin/Desktop/brew_install
     


    .把homebrew repo切换为清华镜像

    cd "$(brew --repo)"
    
    git remote set-url origin https://mirrors.tuna.tsinghua.edu.cn/git/homebrew/brew.git
    
    cd "$(brew --repo)/Library/Taps/homebrew/homebrew-core"
    
    git remote set-url origin https://mirrors.tuna.tsinghua.edu.cn/git/homebrew/homebrew-core.git
    
    brew update

    PS:如果有报错:curl: (7) Failed to connect to raw.githubusercontent.com port 443: Connection refused,可以通过这个命令解决:sudo gem install redis



    作者:小八子的开发之路
    链接:https://www.jianshu.com/p/fdf7e316f096
    来源:简书
    著作权归作者所有。商业转载请联系作者获得授权,非商业转载请注明出处。
  • 相关阅读:
    java内存管理之内存模型
    HTTP协议
    12 数值的整数次方
    11 二进制中1的个数+二进制补充知识点
    10 矩形覆盖
    9 变态跳台阶
    8 跳台阶
    7斐波那契数列
    6旋转数组的最小数字
    5用两个栈实现队列
  • 原文地址:https://www.cnblogs.com/zl1991/p/13843202.html
Copyright © 2020-2023  润新知