zoukankan      html  css  js  c++  java
  • Updating Homebrew...等待问题

    在国内网络环境下使用homebrew卡在Updating Homebrew...

    • 比如:brew install watchman ----> Updating Homebrew...

    解决方法: 更换成淘宝镜像

    • 平时我们执行 brew 命令安装软件的时候,跟以下 3 个仓库地址有关:
      1. brew.git
      2. homebrew-core.git
      3. homebrew-bottles

    通过以下操作将这 3 个仓库地址全部替换为 淘宝镜像

    • 替换 / 还原 brew.git 仓库地址

      1. 替换成淘宝的 brew.git 仓库地址:
      1. 还原为官方提供的 brew.git 仓库地址
    • 替换 / 还原 homebrew-core.git 仓库地址

      1. 替换成淘宝的 homebrew-core.git 仓库地址:
      1. 还原为官方提供的 homebrew-core.git 仓库地址
    • 替换 / 还原 homebrew-bottles 访问地址

      • 这个步骤跟你的 macOS 系统使用的 shell 版本有关系,所以,先来查看当前使用的 shell 版本

        1. echo $SHELL
        2. 如果你的输出结果是 /bin/zsh,参考 zsh 终端操作方式
        3. 如果你的输出结果是 /bin/bash,参考 bash 终端操作方式
      • zsh 终端操作方式

        1. 替换成淘宝的 homebrew-bottles 访问地址:
        • echo 'export HOMEBREW_BOTTLE_DOMAIN=https://mirrors.aliyun.com/homebrew/homebrew-bottles' >> ~/.zshrc
        • source ~/.zshrc
        1. 还原为官方提供的 homebrew-bottles 访问地址
        • vi ~/.zshrc
        • 然后,删除 HOMEBREW_BOTTLE_DOMAIN 这一行配置
        • source ~/.zshrc
      • bash 终端操作方式

        1. 替换 homebrew-bottles 访问 URL:
        • echo 'export HOMEBREW_BOTTLE_DOMAIN=https://mirrors.aliyun.com/homebrew/homebrew-bottles' >> ~/.bash_profile
        • source ~/.bash_profile
      • 还原为官方提供的 homebrew-bottles 访问地址

        1. vi ~/.bash_profile
        2. 然后,删除 HOMEBREW_BOTTLE_DOMAIN 这一行配置
        3. source ~/.bash_profile
  • 相关阅读:
    jquery面试(2)
    jquery面试题
    javascript面试题(2)
    javascript--面试题
    遇到的问题:
    artTemplate的使用案列
    CSS3 background-size 属性
    listandset实例
    testng.xml
    sts设置Code Templates
  • 原文地址:https://www.cnblogs.com/boye-1990/p/14439575.html
Copyright © 2011-2022 走看看