• mac brew install 慢解决办法


    说明:原文(https://www.jianshu.com/p/6ea6e19c060d)

    这个问题困扰了我很久,在网上找了很多资料。都是断章取义。没介绍完整,
    都没有实际效果;最近需要在本地安装mysql。 为了安装快一点,
    又重新面对brew install 慢的问题。又在网上把之前看的重新试一下。
    终于解决了。下面的步骤,都是在本机上执行成功。brew install 慢的问题已经解决。
    希望可以帮读者

    步骤

    切换到 Homebrew 目录

    cd "$(brew --repo)"
    查看远程仓库 git remote -v.  默认的使用的github。
     删除远程: git remote rm origin 
    添加阿里源 :git remote add origin https://mirrors.aliyun.com/homebrew/brew.git
    切换成阿里源: git remote set-url origin https://mirrors.aliyun.com/homebrew/brew.git
     

    替换 homebrew-core.git:

    cd "$(brew --repo)/Library/Taps/homebrew/homebrew-core"
    查看远程仓库 git remote -v.  默认的使用的github。
     删除远程: git remote rm origin 
    添加阿里源 :git remote add origin https://mirrors.aliyun.com/homebrew/homebrew-core.git
    切换成阿里源: git remote set-url origin https://mirrors.aliyun.com/homebrew/homebrew-core.git
     

    替换 homebrew-bottles: 二进制文件

    echo 'export HOMEBREW_BOTTLE_DOMAIN=https://mirrors.aliyun.com/homebrew/homebrew-bottles' >> ~/.bash_profile
    source ~/.bash_profile
    
     
    替换 homebrew-cask.git: cask 表示 GUI 应用的源, 阿里云没有提供 cask 源, 故使用 USTC 源
    cd "$(brew --repo)"/Library/Taps/homebrew/homebrew-cask
    git remote rm origin 
    git remite add origin https://mirrors.ustc.edu.cn/homebrew-cask.git
    git remote set-url origin https://mirrors.ustc.edu.cn/homebrew-cask.git 

     
     


    作者:IT入门指南
    链接:https://www.jianshu.com/p/6ea6e19c060d
    来源:简书
    著作权归作者所有。商业转载请联系作者获得授权,非商业转载请注明出处。
  • 相关阅读:
    愿你出走半生,归来多赚点钱
    喝下这碗毒鸡汤:作为一个『乖』学生,请一定要以学业为主!
    劝你理财,是我最大的温柔-lip师兄
    大半夜客户问我为什么这么拼,我给她算了笔账,她嚎啕大哭......
    女人为什么要经济独立
    定投6年以亏损收场,他到底做错了什么
    你的死工资,正在拖垮你&一辈子需要花多少钱
    字符串的长度
    泥塑课
    最大的数
  • 原文地址:https://www.cnblogs.com/lz0925/p/16418835.html
Copyright © 2020-2023  润新知