Ar2zee
Ar2zee

Reputation: 420

MongoDB unrecognised option --install

Hello Everybody , I'm trying to install MongoDB to play around with NoSQL DB but I have an error and can't fix it by myself.


But I'm still have the same error when trying to set up DB.

I'm using MacOs 10.13

I can't go further from this point , I was trying to do the same without without flag --install but I'm always have the same issue

I can't start Server

Can Anybody help me and explain why --install doesn't work on my platform and how to resolve this issue.


mongod --directoryperdb --dbpath /usr/local/Cellar/mongodb/3.4.9/data/db --logpath /usr/local/Cellar/mongodb/3.4.9/log/mongo.log --logappend --rest  --install

Error parsing command line: unrecognised option '--install'
try 'mongod --help' for more information


Terminal Error


Update #1

1. I was trying to write the same command without --install but this solution give me option to start server just once and from another terminal window , after that if I close terminal I can't start server again.

without install


2. Using Sudo give me the same error.


3. mongod --version give me this

mongo version

Upvotes: 2

Views: 8017

Answers (2)

prashant sindhu
prashant sindhu

Reputation: 1891

You are clubbing 2 steps togeather. 1. install mongodb 2. launch mongodb

Command given by you is for launching mongodb(dont use --install). for installing mongodb in mac Os -https://treehouse.github.io/installation-guides/mac/mongo-mac.html

Upvotes: 1

223seneca
223seneca

Reputation: 1176

First, try entering mongod --version to see if a version is already installed.

Next, try just running the original command without the --install.

If none of those work, then try running your original command with sudo at the beginning.

Upvotes: 2

Related Questions