First of all, thanks for your prompt reply…
I tried your commands…
It gives following output :
Hi @Prasad_35679,
There is a space between nano and /etc/paths
sudo nano /etc/paths
Thanks,
Shubham Ranjan
Curriculum Support Engineer
Hi @Prasad_35679,
Congratulations
Now you have successfully setup mongo shell on your system. If you have any other query please feel free to get back to us.
Happy Learning
Thanks,
Shubham Ranjan
Curriculum Support Engineer
need help …
previously in bash terminal mongo shell was connected but after updating terminal to zsh …not able to do anything …
want to know where i am doing mistakes??
Hi @Anuja_85051,
Have you tried after restarting the terminal ?
Also, if the issue is still unresolved then please try this approach.
Let me know if this was helpful.
Thanks,
Shubham Ranjan
Curriculum Support Engineer
Hello
I’ve followed all the steps mentioned above and it does not work :
Thanks for the help !
Try to give full path of mongo and check if it works or not
After you edited /etc/paths file and saved are you able to see new path?
echo $PATH
or try from a new session
I hope you found @Ramachandra_37567’s response helpful. Please let me know if you are still facing the same issue.
Thanks,
Shubham Ranjan
Curriculum Services Engineer
Thanks for the answers!
After I edited the /etc/paths file and enter echo $PATH that what I got :
and I tried again to enter mongo --nodb in a new session and it still not work : .
As I can see in the screenshot, you have an extra space at the end of the path ~/mongodb-macos-x86_64-enterprise-4.2.2/bin
. Please remove it -> save the file -> restart your terminal and you should be good to go from here.
Hope it helps!
Happy Learning
Thanks,
Shubham Ranjan
Curriculum Services Engineer
It finally worked ! thanks a lot
Shubham, I am encountering the exact same error. I followed the thread above using Nano and double-checked to ensure I did not add spaces, etc. Note that I am zsh, not bsh (I am OS 10.15.2). Am I running into a SIP issue? I did the install per the tutorial in M001 but am stuck at Chapter 2: Installing the Mongo Shell. I have attached a screenshot of a fresh terminal with echo command and query results.
May be you have to edit your .zshrc file
Please check stackoverflow threads
I have done this but nothing changed. It should not be this impossible to get a MongoDB Shell running. Is there a summary anywhere that is up-to-date with complete steps based on Mac OS X Catalina?
@Ramachandra_37567 … I have gone a different route and got it working. Thanks for the assistance anyway. This is resolved for me.
Hi! I followed all the steps but still receive the message zsh: command not found: mongo
Can you help me please?
Ambra
Hi @Ambra_23470,
Please use the default bash shell
and not the z shell
.
Please let me know if the issue still persists.
Thanks,
Shubham Ranjan
Curriculum Services Engineer
How can I run the bass shell? When I run The Terminal app it automatically Open the z shell…
Thank you
Hi @Ambra_23470,
Please refer this question on StackOverflow.
Hope it helps!
Thanks,
Shubham Ranjan
Curriculum Services Engineer