MongoDB installed via Homebrew not working

前端 未结 5 950
迷失自我
迷失自我 2021-02-19 21:55

I installed MongoDB via Homebrew (following http://docs.mongodb.org/manual/tutorial/install-mongodb-on-os-x/) but it\'s not working.

Typing mongod at shell

5条回答
  •  旧时难觅i
    2021-02-19 22:35

    If you are on mongodb-community@4.0. You can try to reinstall with brew reinstall mongodb-community@4.0.

    Then I get the following hint:

    ==> Caveats
    mongodb-community@4.0 is keg-only, which means it was not symlinked into /usr/local,
    because this is an alternate version of another formula.
    
    If you need to have mongodb-community@4.0 first in your PATH run:
      echo 'export PATH="/usr/local/opt/mongodb-community@4.0/bin:$PATH"' >> ~/.bash_profile
    

    So you can just copy the echo command and restart your shell!

提交回复
热议问题