错误

  1. brew install cmake
  2. Warning: Treating cmake as a formula. For the cask, use homebrew/cask/cmake
  3. Warning: You are using macOS 12.
  4. We do not provide support for this pre-release version.
  5. You will encounter build failures with some formulae.
  6. Please create pull requests instead of asking for help on Homebrew's GitHub,
  7. Twitter or any other official channels. You are responsible for resolving
  8. any issues you experience while you are running this
  9. pre-release version.
  10. Error: cmake: no bottle available!
  11. You can try to install from source with:
  12. brew install --build-from-source cmake
  13. Please note building from source is unsupported. You will encounter build
  14. failures with some formulae. If you experience any issues please create pull
  15. requests instead of asking for help on Homebrew's GitHub, Twitter or any other
  16. official channels.
  1. ->brew update
  2. cat: /usr/local/Homebrew/.git/TMP_FETCH_FAILURES: No such file or directory
  3. Error: Fetching /usr/local/Homebrew/Library/Taps/homebrew/homebrew-cask-fonts failed!
  4. Fetching /usr/local/Homebrew/Library/Taps/homebrew/homebrew-core failed!
  5. Fetching /usr/local/Homebrew failed!
  6. Fetching /usr/local/Homebrew/Library/Taps/mongodb/homebrew-brew failed!
  7. Fetching /usr/local/Homebrew/Library/Taps/homebrew/homebrew-cask failed!

解决办法一:

  1. echo 'export HOMEBREW_BOTTLE_DOMAIN=https://mirrors.ustc.edu.cn/homebrew-bottles' >> ~/.zshrc
  2. source ~/.zshrc
  3. brew update

解决办法二:

  1. brew update-reset && source ~/.zshrc
  2. brew update