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.
It seems the mongodb tap was moved. This worked for me:
brew uninstall mongodb
brew tap mongodb/brew
brew 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 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! 🤗
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With