Run the command brew install mongodb, the result interface has been stuck at Updating Homebrew…
The solution is to replace the brew source:
–Use a new source:
Replace brew.git:
cd "$(brew --repo)"
git remote set-url origin https://mirrors.ustc.edu.cn/brew.git
Replace homebrew- core.git:
cd "$(brew --repo)/Library/Taps/homebrew/homebrew-core"< br />git remote set-url origin https://mirrors.ustc.edu.cn /homebrew-core.git
–Resume Reset the default source:
Reset brew.git:
cd < span style="color: #800000">"$(brew --repo)"< /span>
git remote set-url origin https://github.com/Homebrew/brew.git
Reset homebrew-core.git:
cd "$ (brew --repo)/Library/Taps/homebrew/homebrew-core"
git remote set-url origin https://github.com/Homebrew/homebrew-core .git
Replace brew.git:
cd < span style="color: #800000">"$(brew --repo)"
git remote set span>-url origin https://mirrors.ustc.edu.cn/brew.git
Replace homebrew-core.git:
cd "$(brew --repo)/Library/Taps/homebrew/homebrew-core"
git remote set-url origin https://mirrors.ustc.edu.cn/homebrew-core.git
Reset brew.git:
cd "$(brew --repo)"
git remote set span>-url origin https:/ /github.com/Homebrew/brew.git
Reset homebrew-core.git:
cd "$(brew --repo)/Library/Taps/homebrew/homebrew-core"
git remote set-url origin https://github .com/Homebrew/homebrew-core.git