Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

"No similarly named formulae found" when trying to install MongoDB on macOS

I'm trying to install MongoDB server on macOS Big Sur using brew, I'm following the documentation on the official mongo website.
I run the following command:

brew tap mongodb/brew

after that, I run:

brew install [email protected]

but I got the following error:

Error: No similarly named formulae found.
Error: No available formula with the name "mongosh" (dependency of mongodb/brew/mongodb-community).
It was migrated from mongodb/brew to homebrew/core.

like image 937
Ayoub k Avatar asked Jun 13 '21 00:06

Ayoub k


People also ask

How do I enable MongoDB on Mac?

Open the Terminal app and type brew update . Run the Mongo daemon, in one of your terminal windows run mongod . This should start the Mongo server.


3 Answers

As the error message shows, you need to first install mongosh(https://github.com/mongodb-js/mongosh#readme).

Steps:

  1. brew update
  2. brew install mongosh
  3. brew install mongodb-community .

Should fix your problem.

like image 120
Zhehao Li Avatar answered Oct 28 '22 07:10

Zhehao Li


Steps:

  1. brew untap mongodb/brew
  2. brew tap mongodb/brew
  3. brew install mongodb-community

fix my problem.

like image 24
Rosen Avatar answered Oct 28 '22 06:10

Rosen


For me homebrew-core was not tapped properly.

 brew doctor


Warning: Homebrew/homebrew-core was not tapped properly! Run:
  rm -rf "/opt/homebrew/Library/Taps/homebrew/homebrew-core"
  brew tap homebrew/core

Warning: Some taps are not on the default git origin branch and may not receive
updates. If this is a surprise to you, check out the default branch with:
  git -C $(brew --repo homebrew/core) checkout master

We need to remove and tap homebrew/core again.

rm -rf "/opt/homebrew/Library/Taps/homebrew/homebrew-core"
brew tap homebrew/core

After this we need to tap mongodb/brew

brew tap mongodb/brew

And then install mongodb-community

brew install mongodb-community

It worked for me.

like image 40
seef07 Avatar answered Oct 28 '22 06:10

seef07