Updating Homebrew... ...长时间卡住的问题

  最近做自动化测试时,深感自己对前端涉猎太少,加上对这块比较感兴趣,想花点时间在这个上面——不料在搭建vue环境时就遭遇了第一次翻车。

  在执行 $brew install vue 时,一直卡顿在了 Updating Homebrew... ...命令行上。排除了网络因素后,终于在网上找到了解决方案。

  首先要确保电脑上已经安装了brew。然后依次输入下面命令行:  

    替换brew.git:
      cd "$(brew --repo)"
      git remote set-url origin https://mirrors.ustc.edu.cn/brew.git

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

  亲测有效。

猜你喜欢

转载自www.cnblogs.com/May-study/p/10260046.html