macOS Home brew github超慢 替换清华镜像

作者 :
免费
  • 正文
  • 目 录

    第一步,获取install文件

    把官网给的脚本拿下来

    1.打开terminal.app

    粘贴

    curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install >> brew_install

    第二步,更改脚本中的资源链接,替换成清华大学的镜像

    获取的文件在:/Users/wy 目录下 brew_install

    2.使用sublimeText打开文件

    把这句屏蔽掉

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

    加上这两句

    BREW_REPO = "https://mirrors.ustc.edu.cn/brew.git".freeze
    CORE_TAP_REPO = "https://mirrors.ustc.edu.cn/homebrew-core.git".freeze

    第三步,执行脚本

    3.粘贴到终端

    /usr/bin/ruby brew_install

    遇到提示会车确认

    控制台输出

    wydeMacBook-Air:~ wy$ /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...
    remote: Counting objects: 262, done.
    remote: Compressing objects: 100% (204/204), done.
    remote: Total 262 (delta 121), reused 111 (delta 45)
    Receiving objects: 100% (262/262), 138.17 KiB | 2.19 MiB/s, done.
    Resolving deltas: 100% (121/121), done.
    From https://mirrors.ustc.edu.cn/brew
     * [new tag]             1.16                 -> 1.16
     * [new tag]             backup/brew-cask-style-14-54-55 -> backup/brew-cask-style-14-54-55
     * [new tag]             backup/create-cache-00-29-47 -> backup/create-cache-00-29-47
     * [new tag]             backup/days-03-02-52 -> backup/days-03-02-52
     * [new tag]             backup/days-03-02-59 -> backup/days-03-02-59
     * [new tag]             backup/days-19-30-23 -> backup/days-19-30-23
     * [new tag]             backup/gpg-verification-01-53-16 -> backup/gpg-verification-01-53-16
     * [new tag]             backup/remove-popen-read-19-56-50 -> backup/remove-popen-read-19-56-50
     * [new tag]             backup/remove-popen-read-20-00-21 -> backup/remove-popen-read-20-00-21
    HEAD is now at 203f8d66a Merge pull request #6547 from MikeMcQuaid/sandbox-allow-more-tty
    Already up-to-date.
    ==> Installation successful!
    
    ==> Homebrew has enabled anonymous aggregate formulae and cask analytics.
    Read the analytics documentation (and how to opt-out) here:
      https://docs.brew.sh/Analytics
    
    ==> Homebrew is run entirely by unpaid volunteers. Please consider donating:
      https://github.com/Homebrew/brew#donations
    ==> Next steps:
    - Run `brew help` to get started
    - Further documentation: 
        https://docs.brew.sh

    完成。

     

    END
    如本资源侵犯了您的权益,请联系投诉邮箱admin@wmphp.com进行举报!我们将在收到邮件的1个小时内处理完毕。 本站仅为平台,发布的资源均为用户投稿或转载!所有资源仅供参考学习使用,请在下载后的24小时内删除,禁止商用! Wmphp.com(完美源码)助力正版,如您有自己的原创产品,可以联系客服投稿,代理出售! Wmphp.com(完美源码)客服QQ:136882447 Wmphp.com(完美源码)商务电话(仅对企业客户/个人用户):15120086569 (微信同步) 请注意:本站不提供任何免费的技术咨询服务,为了节约时间,下载前 请确认自己会技术
    完美源码 » macOS Home brew github超慢 替换清华镜像
    2420+

    本站勉强运行

    163+

    用户总数

    510+

    资源总数

    0+

    今日更新

    2021-5-14

    最后更新时间