Error: MongoDB: unknown version: mountain_lion

I am running these simple commands on mac:

brew upgrade mongodb

or

brew install mongodb

I am getting this error below:

Error: mongodb: unknown version :mountain_lion

If I run the simple command: mongo , I get this,

MongoDB shell version v4.0.3

But then I get an error saying couldn't connect to server

Worth to note, I was playing around with the command line last night and somehow deleted all of my databases from mongodb on my machine (I think). I continuously get the above error when trying install and/or update mongodb.

I am "new" to mongoDB, but I have created a few full stack projects using it over the last 5-6 months. Not sure what I did, but I also can't run node db/seeds.js either as I get errors, even though I have the data in my vscode projects.

I've tried simply updating and installing mongodb. I also tried some simple server commands but was unsuccessful.

5

3 Answers

It seems the mongodb tap was moved. This worked for me:

  • brew uninstall mongodb
  • From
    • brew tap mongodb/brew
    • brew install mongodb-community
1

🙁 Unfortunately, MongoDB has been removed from homebrew-core.

But... MongoDB team maintains a custom Homebrew tap. 😁

I've uninstalled the old MongoDB:

brew services stop mongodb
brew uninstall mongodb

and reinstalled the new tap:

brew tap mongodb/brew
brew install mongodb-community
brew services start mongodb-community

Source: mongobd/homebrew-brew Readme.md

Good luck! 🤗

Your system may be too old. Apparently mongo doesn't support older Mac systems - below 10.12 for community edition and 10.11 for enterprise.

Check this: SO linkand the supported systems page on the mongo site

3

Your Answer

Sign up or log in

Sign up using Google Sign up using Facebook Sign up using Email and Password

Post as a guest

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

You Might Also Like