Multiple paths in .bash_profile

I have Anaconda installed in MacOS Catalina, thus the installment instruction won’t work in my case. By adding another path like the lecture shows won’t overwrite anything at this point. Does anyone know how to resolve this?

Many thanks!

Hi @uber_87809,

Please have a look at this post for setting the path on your Mac computer.

Hope it helps!

Thanks,
Shubham Ranjan
Curriculum Support Engineer

Hi Shubham,

Thanks for your notes. I confirm I am following the steps exactly, but still it doesn’t work. Terminal says “command not found: mongo.”

Do you have any advice for troubleshooting? Thanks.


Have you restarted your terminal after changes to the file
Can you see mongodb path in your PATH variable
If path is updated it should work
Can you invoke mongo command from the bin dir?

Please check this link.It may help.Going back to bach from zsh helped another student

Mongo –nodb command not found

Hi @uber_87809,

As @Ramachandra_37567 mentioned,

Can you please cd into the ~/mongodb-osx-x86_64-enterprise-4.2.1/bin directory and then run the mongo --nodb command just to verify the binaries are there and not corrupted?

Additionally, we have seen some cases were users were not able to run the mongo commands in ZSH/ Z shell but they were able to do it in the bash.

Can you please try to run the above mentioned command in the bash ?

Thanks,
Shubham Ranjan
Curriculum Support Engineer

Have you restarted your terminal after changes to the file – Yes.
Can you see mongodb path in your PATH variable – Yes, the screenshot is a proof.
Can you invoke mongo command from the bin dir? – Unfortunately no.

I’ll try bash later, thanks for your notes anyway. Ever since I have upgraded my system to Catalina, weird things keep happening. It took me time to get Anaconda and IPython back to work as usual, guess it will also cost me time setting up MongoDB at some point.

Now I change back to bash and meet with the same situation as the thread below describes:

So my question now is, except download Enterprise version directly, may I install Enterprise Server through terminal? I guess that may help. Apparently my laptop is responding to mongo when I change back to bash, but Apple does not let me open it and want to delete the corresponding files.

I just tried both, neither works. Not sure what is going on exactly.

OK, now it works and here is how I did (though I don’t know why it works but it works):

  1. do sudo nano /etc/paths and include that ~/ mongodb…
  2. save and exit
  3. restart terminal
  4. try mongo --nodb, not working in zsh (no command named mongo)
  5. switch to bash
  6. try mongo --nodb, not working in bash(no command named mongo)
  7. open the bin folder, right click mongo and open through terminal
  8. Check system preference making sure mongodb is a trusted developer
  9. restart terminal, try mongo --nodb, it works.

If anyone having trouble due to Catalina, worth a try…

1 Like