无法使用mongo命令,显示在Mac上找不到的命令 [英] Can't use mongo command, shows command not found on mac

查看:61
本文介绍了无法使用mongo命令,显示在Mac上找不到的命令的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用Mac Lion.我正在使用mongodb 1.4版.我想升级到1.8.5,然后按照 http://shiftcommathree.com/articles/how-to-install-mongodb-on-os-x 逐步将每个mongodb-osx-x86_64-1.4.0替换为mongodb-osx-x86_64-1.8.5.一切都很顺利.我试过了:

I'm using Mac Lion. I was using mongodb version 1.4. I wanted to upgrade to 1.8.5 and I followed http://shiftcommathree.com/articles/how-to-install-mongodb-on-os-x step wise replacing each mongodb-osx-x86_64-1.4.0 by mongodb-osx-x86_64-1.8.5. Everything goes smooth. I tried:

mongod 

没关系.我可以访问本地主机:28017但是,

it's ok. I can access localhost:28017 but,

mongo

显示未找到命令

我该如何解决?

推荐答案

您需要将"mongo"的路径添加到终端外壳.

You need to add the path to "mongo" to your terminal shell.

export PATH=$PATH:/usr/local/mongodb/bin

您是否使用path.d做最后一步?如果是这样,请尝试重新启动终端.

Did you do the last step with paths.d? If so, try restarting your terminals.

您是否有充分理由使用1.8.5?当前的稳定版本是2.0.4,并且从1.8.x起有许多有用的升级

Do you have a good reason for using 1.8.5? The current stable is 2.0.4, and it has many useful upgrades from 1.8.x

这篇关于无法使用mongo命令,显示在Mac上找不到的命令的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆