Running the command brew tap mongodb/brew: i ran into the following. I ran into the following :
Error: Invalid formula: /opt/homebrew/Library/Taps/mongodb/homebrew-brew/Formula/mongocli.rb
formulae require at least a URL
Error: Cannot tap mongodb/brew: invalid syntax in tap!
Go to Finder > Utilities and right click on Terminal and select "Get Info"
Find the option "Open using Rosetta" and check it.
Open new Terminal Run
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install.sh)"
"brew tap mongodb/brew"
After it completes close the terminal and uncheck "Open using Rosetta".
brew install mongodb-community@4.4
.This did not work for me so i tried this:
arch -arm64 brew install mongodb-community@4.4
And it worked.I suggest you find the one that works for you. Thanks to these articles.