Search code examples
mongodbhomebrewmacos-monterey

Mongo is not installed via Homebrew (MacOS Monterey)


I am trying to use MongoDB on MacOS Monterey, but it does not seem to work. I've installed it via Homebrew, and the

/opt/homebrew/Cellar/mongodb-community/6.0.1/bin/mongo

is missing.

brew list mongodb-community@6.0

returns:

/opt/homebrew/Cellar/mongodb-community/6.0.1/bin/install_compass
/opt/homebrew/Cellar/mongodb-community/6.0.1/bin/mongod
/opt/homebrew/Cellar/mongodb-community/6.0.1/bin/mongos
/opt/homebrew/Cellar/mongodb-community/6.0.1/homebrew.mxcl.mongodb-community.plist
/opt/homebrew/Cellar/mongodb-community/6.0.1/MPL-2
/opt/homebrew/Cellar/mongodb-community/6.0.1/THIRD-PARTY-NOTICES

Solution

  • You need first use:

    brew tap mongodb/brew
    

    Then use:

    brew install mongodb-community@6.0
    

    This is documented on this MongoDB page: https://www.mongodb.com/docs/manual/tutorial/install-mongodb-on-os-x/