Command not found

I’m confused on how to create the path for the mongo shell. I’m not sure what am I doing wrong. I am using iOSX.

I am having trouble with this too. I keep receiving command not found for mongod.

have you edited the .bash_profile file?

it can be found in your home directory but is hidden so you may have to unhide files by pressing

CMD + SHIFT + .

keys at the same time

then open .bash_profile in a text editor

and add the line

export PATH="~/mongodb-osx-x86_64-4.0.5/bin:$PATH"

then save the file

If you have any issues let me know ill try to help

yes I did that and just verified it’s still saved.

Can you copy the contents of that file here?

And confirm you copied the MongoDB package in the root of you home directory and what the directory name is?

source ~/.bashrc

export PATH="~/mongodb-osx-x86_64-4.0.5/bin:$PATH"

#THIS MUST BE AT THE END OF THE FILE FOR SDKMAN TO WORK!!!
export SDKMAN_DIR="/Users/ariel/.sdkman"
[[ -s “/Users/ariel/.sdkman/bin/sdkman-init.sh” ]] && source “/Users/ariel/.sdkman/bin/sdkman-init.sh”

Your previous /Users/ariel/.bash_profile file was backed up as /Users/ariel/.bash_profile.macports-saved_2018-04-02_at_09:44:04

MacPorts Installer addition on 2018-04-02_at_09:44:04: adding an appropriate PATH variable for use with MacPorts.

export PATH="/opt/local/bin:/opt/local/sbin:$PATH"

Finished adapting your PATH environment variable for use with MacPorts.

went with the docker route. seems to have been a success. thanks!

Please, explain what do you mean by going “with the docker route”.

Hi @izetter,

If you are facing difficulty in setting up mongo shell on your system then please have a look at this post and see if it is helpful.

Thanks,
Shubham Ranjan
Curriculum Services Engineer

Thank you Shubham.

I was originally exploring the possibility of going through the course using Docker, I will try that once I finish the course.

As for the mongo shell, I added the following line to my .profile file (I didn’t create a .bash_profile file),

export PATH="~/mongodb-linux-x86_64-enterprise-ubuntu1804-4.2.2/bin:$PATH"

Hi @izetter,

Please let me know if you are still facing any issue.

Thanks,
Shubham Ranjan
Curriculum Services Engineer