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

Viewed 5399

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 mongodb-community@4.4

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.

6 Answers

Steps:

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

fix my problem.

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.

You need to remove tap by running brew untap mongodb/brew.

Then you can run brew install mongodb-community@4.4 and it will install from the core homebrew tap, where the package now lives.

For me, this was linked to the homebrew core being missing as per https://github.com/Homebrew/discussions/discussions/1512

steps: run the command

brew config

if you get Core tap HEAD: (none) in the body, then likely you had the same issue as me. Run the command

brew tap homebrew/core

You can then go back to the installation steps


brew tap mongodb/brew

brew install mongodb-community@6.0 

And everything should install correctly (it did for me anyway).

Run this command in terminal:

rm -fr $(brew --repo homebrew/core)

Then try:

 brew install mongosh

It work perfectly

Related