在配置開發(fā)環(huán)境時遇到了問題。執(zhí)行:$ brew install watchman,在安裝watchman的時候卡在(updating homebrew...)不動,開始以為是網(wǎng)絡(luò)問題,后來不甘心還是網(wǎng)上找找解決方案,結(jié)果還是找到了。
確保你已安裝Homebrew
依次輸入下面的命令(注意:不要管重置部分的命令,這里原作者貼出來、我也貼出來是以防需要重置的時候有參考操作命令)
替換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
重置brew.git:
cd "$(brew --repo)"
git remote set-url origin https://github.com/Homebrew/brew.git
重置homebrew-core.git:
cd "$(brew --repo)/Library/Taps/homebrew/homebrew-core"
git remote set-url origin https://github.com/Homebrew/homebrew-core.git