Unable to update Mongo Path.
I am using Catalina and there was no .bash_profile in the machine so I created one with below text:
==
export PATH=“~/mongodb-macos-x86_64-enterprise-4.2.1/bin:$PATH”
Existing PATH value:
/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin
Even after quitting terminal I still see the old PATH. Don’t see the bash profile impacting the PATH variable. I do not know where else I need to update the PATH.
Thanks in advance!
Hi @ashwini_89251 ,
Can you please have a look at this post and update the path by following the instructions mentioned in this post ?
Kindly use this link to download the MongoDB Enterprise Server .
Now follow the steps mentioned below to set up the mongo shell in your system.
Move the downloaded file to your home directory
Unzip it
Open terminal
Run this command :
sudo nano /etc/paths
Terminal will ask to enter the password
A new file will open up containing the path variables
Go to the bottom and add the path i.e.
~/ mongodb-osx-x86_64-enterprise-4.0.10 /bin
Note : The folder name (Highlighted above) could be different for you if you have downlaoded any other version.
Press ctrl+x and then hit enter
Restart the terminal
To test if the path has been successfully set up or not, try running this command
mongo --nodb
If all went well you should be able to see something like this :
MongoDB shell version v4.0.10
Welcome to the MongoDB shell.
Hope it helps!
If the issue still persists then please feel free to get back to us. Happy Learning
Thanks,
Shubham Ranjan
Curriculum Support Engineer
Hi Shubham,
Thank you! That just worked perfect! Happy learning indeed!
I now see below:
echo $PATH
/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:~/mongodb-macos-x86_64-enterprise-4.2.1/bin
When I login to mongo I see below:
$ mongo --nodb
MongoDB shell version v4.2.1
Welcome to the MongoDB shell.
For interactive help, type “help”.
For more comprehensive documentation, see
Questions? Try the support group
http://groups.google.com/group/mongodb-user
======