I tried opening the terminal using Rosetta but when I run brew install mongodb-community@5.0 I get an error that says:
Error: Cannot install under Rosetta 2 in ARM default prefix (/opt/homebrew)! To rerun under ARM use: arch -arm64 brew install ... To install under x86_64, install Homebrew into /usr/local.
However, when I run it as arch -arm64 brew install mongodb-community@5.0, it again complains with:
arch: posix_spawnp: brew: Bad CPU type in executable
Any help would be appreciated.
Thanks in advance.