安装完MongoDB后,发现mongo不生效。

zsh: command not found: mongo

 

原因:

因为我用的是zsh,需要编辑 zsh 的配置文件~/.zshrc。修改.bash_profile可能无效

 

解决方案:

open ~/.zshrc

加上

export PATH="$PATH:/usr/local/opt/mongodb-community@4.2/bin"

然后:source ~/.zshrc

 

相关文章:

  • 2021-12-23
  • 2021-04-12
  • 2021-12-08
  • 2021-11-18
  • 2021-04-01
  • 2021-12-12
  • 2021-07-29
  • 2021-09-08
猜你喜欢
  • 2022-12-23
  • 2022-02-25
  • 2021-06-17
  • 2021-09-29
  • 2021-11-23
  • 2022-01-12
  • 2021-09-08
相关资源
相似解决方案