I am running these simple commands on mac:
brew upgrade mongodbor
brew install mongodbI 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.
53 Answers
It seems the mongodb tap was moved. This worked for me:
brew uninstall mongodb- From
brew tap mongodb/brewbrew install mongodb-community
🙁 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 mongodband reinstalled the new tap:
brew tap mongodb/brew
brew install mongodb-community
brew services start mongodb-communitySource: 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