Install mongo shell in mac

Viewed 10855

i wanted to install only mongo-shell in my mac

i ran brew update and then i ran brew install mongodb-org-shell .. But it is not getting installed. Below is the error message


bash-3.2$ brew install mongodb-org-shell 
Error: No available formula with the name "mongodb-org-shell" 
==> Searching for a previously deleted formula (in the last month)...
Warning: homebrew/core is shallow clone. To get complete history run:
  git -C "$(brew --repo homebrew/core)" fetch --unshallow

Error: No previously deleted formula found.
==> Searching for similarly named formulae...
Error: No similarly named formulae found.
==> Searching taps...
==> Searching taps on GitHub...
Error: No formulae found in taps.
bash-3.2$ 
2 Answers

From what I found on MongoDB HomeBrew, to install only the Mongo Shell you should use:

brew tap mongodb/brew

After that, install the shell:

brew install mongodb-community-shell

You might want to install mongosh (MongoDB Shell) instead. The legacy mongo shell has been deprecated since MongoDB v5.0 and replaced by mongosh. Please refer to this answer.

Related