Cannot install MongoDB Community on Apple M1

Viewed 282

I have an Apple M1 using macOS Monterey and I am trying to install MongoDB community latest version. After following the documentation on the website I received this error message (note: I am using a Rosetta terminal because M1 chips do not support homebrew). Does anyone know what is happening with this error? Please help.

What I have tried:

  • stopping and restarting the service and again it does not work when I then type "mongo" or "mongosh" I get an error to refuse to connect.
  • I also tried uninstalling and reinstalling many times.
  • Possible error is the line Already downloaded: /Users/katejohnson/Library/Caches/Homebrew/downloads/5bd79f1c70119d0cda4b01fc074ad77ad00a7e8dfc9b243016157d9ee7009874--mongosh-1.3.1.bottle_manifest.json When I download it (see terminal screenshot)
 brew services start mongodb-community@5.0
Bootstrap failed: 5: Input/output error
Try re-running the command as root for richer errors.
Error: Failure while executing; `/bin/launchctl bootstrap gui/501 /Users/katejohnson/Library/LaunchAgents/homebrew.mxcl.mongodb-community.plist` exited with 5.

Terminal screenshot

1 Answers

Restart your macOS. Run brew services start mongodb-community@5.0. It should fix the problem!

Screenshot of mongodb shell running as a service

The issue is with the .plist file that needs to be present in LaunchAgents directory for launchctl to run mongod service on startup.

Related