Problem installing MongoDB on macOS?
Read on! Here is the only working solution!
Jun 13, 2021
I have used MongoDB for a long time and have had to re-install it every once in a while, but never had such problems as recently I tried to install it on my macOS!
Apple has beefed up the security on recent versions of macOS and messed up HomeBrew ( the recommended way of installing MongoDB ).
TLDR — The solution:
After a whole bunch of troubleshooting and trying different solutions, this has worked great:
- Fix the Brew first but running this command:
sudo chown -R $(whoami) $(brew --prefix)/*
- Tap the new Mongo repo:
brew tap mongodb/brew
- Install MongoDB:
brew install mongodb-community
- Check the brew services:
brew services list
- Start the service if it’s not
started
or anyway:brew services start mongodb-community
- Enjoy!😊