I'm trying to install Mongo but having trouble with the $PATH var in MacOS. Following the guidelines. My $PATH is set in .bash_profile:
echo $PATH /Users/evl/dev/mongodb/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin
entering mongo on command line from other directory:
:~ evl$ mongo -bash: mongo: command not found
I expected that mongo would be found now the $PATH is set
entering ./mongo on command line from mongo bin directory:
cd /Users/evl/dev/mongodb/bin ./mongo MongoDB shell version v4.0.3 connecting to: mongodb://127.0.0.1:27017
So now mongo runs. But only if I move to the folder and I enter './mongo'.
I would expect with the $PATH variable set correctly, the executable would run from any directory. It should actually. What is going wrong? Any help is appreciated!