MongoDB installed via Homebrew not working

前端 未结 5 917
迷失自我
迷失自我 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条回答
  •  北海茫月
    2021-02-19 22:28

    You're getting this error because your 'brew' install failed to create the correct symlinks in /usr/local/bin. As a result, the shell can't find the mongo executables in your $PATH. You can fix this using the following steps:

    • Check the permissions on /usr/local/bin and make sure that you own that directory and have write permissions on it

      $ ls -ld /usr/local/bin

    • Once you've fixed that, run 'brew link' to fix the symlinks

      $ brew link mongodb

提交回复
热议问题