[英]mongodb install error on linux node.js
I'm trying to install MongoDB with node.js on linux. 我正在尝试在Linux上使用node.js安装MongoDB。 I installed it with command npm install mongodb --save
, I can find mongdb dependence in packages.json file but when I use commands mongod, mongodb or mongo I get error 我使用命令npm install mongodb --save
安装了它,我可以在packages.json文件中找到mongdb依赖性,但是当我使用mongod,mongodb或mongo命令时出现错误
bash: mongod: command not found
Please help me 请帮我
Your mistake is you are installing a node.js client for mongoDB but trying to launch a mongodb server in a shell. 您的错误是您正在为mongoDB安装node.js客户端,但尝试在shell中启动mongodb服务器。
In order to use mongod
command you should install mongodb server itself. 为了使用mongod
命令,您应该安装mongodb服务器本身。
Follow this tutorial to install mongoDB in Ubuntu. 按照本教程的说明在Ubuntu中安装mongoDB。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.