15

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$ 
mbuechmann
  • 5,413
  • 5
  • 27
  • 40
Arun
  • 3,440
  • 11
  • 60
  • 108

3 Answers3

52

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 mongosh

For reference, the example below is no longer recommended (deprecated in MongoDB 5.0 in 2021):

brew install mongodb-community-shell
mdahlman
  • 9,204
  • 4
  • 44
  • 72
Caconde
  • 4,177
  • 7
  • 35
  • 32
9

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.

abcoep
  • 577
  • 9
  • 14
0

Install mongosh via brew:

brew install mongosh

Start mongosh using 'ships' database on specified connection string:

mongosh mongodb://192.168.0.5:9999/ships
stratagem
  • 525
  • 6
  • 7