简体   繁体   中英

MongoDB , zsh: command not found: mongo

I just installed MongoDB through homebrew and ran it as a macOS service, then I started the server with command:

brew services start mongodb-community@4.4

==> Successfully started mongodb-community@4.4 (label: homebrew.mxcl.mongodb-community@4.4)

so it's running

but when I tried to run the mongo shell with command: mongo it just showed zsh: command not found: mongo

add the mongo location path to the zsh PATH variable:

echo export PATH=/opt/homebrew/opt/mongodb-community@4.4/bin:$PATH >> ~/.zshrc

open new terminal and try starting again

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM