Problem installing MongoDB on macOS?

Read on! Here is the only working solution!

mim Armand
Jun 13, 2021
With the new macOS updates Brew is having a hard time installing MongoDB!

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:

  1. Fix the Brew first but running this command:
    sudo chown -R $(whoami) $(brew --prefix)/*
  2. Tap the new Mongo repo:
    brew tap mongodb/brew
  3. Install MongoDB:
    brew install mongodb-community
  4. Check the brew services:
    brew services list
  5. Start the service if it’s not started or anyway:
    brew services start mongodb-community
  6. Enjoy!😊

--

--

mim Armand

Sr Solutions Architect / Technology evangelist and Consultant / Teacher of the Full-Stack Web development courses at Washington University in st. Louis