在mac中安装mongo shell

Aru*_*run 4 macos shell homebrew mongodb

我只想安装mongo-shell在我的 mac 上

我跑了brew update然后我跑了brew install mongodb-org-shell..但它没有被安装。下面是错误信息


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$ 
Run Code Online (Sandbox Code Playgroud)

Cac*_*nde 14

从我在MongoDB HomeBrew上找到的内容来看,要仅安装您应该使用的 Mongo Shell:

brew tap mongodb/brew
Run Code Online (Sandbox Code Playgroud)

之后,安装外壳:

brew install mongodb-community-shell
Run Code Online (Sandbox Code Playgroud)


abc*_*oep 9

您可能想安装 mongosh(MongoDB Shell)。自 MongoDB v5.0 起,旧版mongoshell 已被弃用,并由mongosh. 请参考这个答案