We help IT Professionals succeed at work.

cand correctly install and run mongoDB

Medium Priority
138 Views
Last Modified: 2019-06-30
I am not able to run mongoDB after installation on my MAC OS/X. I am consistently getting "command not found".
I have downloaded the package and moved it to the applications folder

then edited the .bash_profile to this:


# Setting PATH for Python 3.6
# The original version is saved in .bash_profile.pysave
PATH="/Library/Frameworks/Python.framework/Versions/3.6/bin:${PATH}"  
export PATH

export NVM_DIR="$HOME/.nvm"
[ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh"  # This loads nvm
[ -s "$NVM_DIR/bash_completion" ] && \. "$NVM_DIR/bash_completion"  # This loads nvm bash_completion

export PATH=/Applications⁩/mongodb⁩/bin⁩:$PATH



but it does not run..

The I tried to test the pat and went there:

Screenshot-2019-06-25-at-08.05.16.png
still mong does not run...
can anyone help?
Comment
Watch Question

KimputerIT Manager
CERTIFIED EXPERT

Commented:
try

./mongo
It looks OK

but only from the actual folder where mong is.

Screenshot-2019-06-25-at-10.27.28.png

my bah_profile is:

Screenshot-2019-06-25-at-10.29.24.png
so, somehow I should change it, namely the line:

xport PATH=/Applications⁩/mongodb⁩/bin⁩:$PATH


can you please help me? What is the meaning of the "./" prefix?
kindest regards

joao
KimputerIT Manager
CERTIFIED EXPERT

Commented:
Not sure what's wrong exactly, but you can try to solve it by adding:

/Applications⁩/mongodb⁩/bin

 /private/etc/paths.d or /etc/path

You can execute files with the ./ if you're currently in that path (to avoid mistakes and malware take over)
Hi
I am sorry to thake this long, but I am on a travel...

Please let me know if the following .bash_profiel is what I should write:

 # Setting PATH for Python 3.6
# The original version is saved in .bash_profile.pysave
PATH="/Library/Frameworks/Python.framework/Versions/3.6/bin:${PATH}"  
export PATH

export NVM_DIR="$HOME/.nvm"
[ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh"  # This loads nvm
[ -s "$NVM_DIR/bash_completion" ] && \. "$NVM_DIR/bash_completion"  # This loads nvm bash_completion

export PATH=/Applications⁩/mongodb⁩/bin⁩:$PATH
export  /private/etc/paths.d:$PATH
export  /etc/path:$PATH


kindest regards
KimputerIT Manager
CERTIFIED EXPERT

Commented:
No you misunderstood. I didn't say edit bash_profile, I said, do it another way. Add the line:


/Applications⁩/mongodb⁩/bin

Open in new window


to the files /private/etc/paths.d or /etc/path
'got it. Thanks.

Now I have a situation:


/private/etc/paths.d  on my computer, this is a folder, not a file so I am stuck..

On the second option, "/etc/path", I am no allowed:

Screenshot-2019-06-28-at-19.29.18.png
do you have any suggestions?
PS. There is note a "path" file; only "paths"..
IT Manager
CERTIFIED EXPERT
Commented:
Yes, you can edit /etc/paths if you invoke root rights (start console as root, or use su/sudo)
Thanks!! It works...

Explore More ContentExplore courses, solutions, and other research materials related to this topic.