"command not found: mongod" error despite updating PATH

96 views Asked by At

I have added this line

export PATH=$PATH:"/Users/pouya/mongodb/bin:$PATH"

to my .bash_profile, but I still get this error:

zsh: command not found: mongod

I use macOS Catalina, and this happened to me with MongoDB.

I can't use Brew because of restrictions on my country and I want to install MongoDB manually, how can I do that?

1

There are 1 answers

0
Hossein On BEST ANSWER

For macOS Catalina the zsh is the default shell, so you should at this line to ~/.zshrc file

vim ~/.zshrc

export PATH=$PATH:"/Users/pouya/mongodb/bin:$PATH"


source ~/.zshrc