cant use mongo command, shows command not found on mac

前端 未结 5 824
长发绾君心
长发绾君心 2020-12-03 03:28

I am using Mac Lion. I was using mongodb version 1.4. i wanted to upgrade to 1.8.5 I followed http://shiftcommathree.com/articles/how-to-install-mongodb-on-os-x step wise r

5条回答
  •  天涯浪人
    2020-12-03 03:40

    1.Go to your [mongodb installation dir]:

    cd 
    

    2.Type ./bin/mongo to start mongo:

    ./bin/mongo
    

    Read More

    Note :

    If above command gives error

    Failed global initialization: BadValue Invalid or no user locale set. Please ensure LANG and/or LC_ environment variables are set correctly.*

    Run bellow command: Read More

    export LC_ALL=C
    

    How can find installation directory

    find / -name "mongodb" 
    

    You can also set path

    export PATH=$PATH:/bin
    

提交回复
热议问题