Intellipaat Back

Explore Courses Blog Tutorials Interview Questions
0 votes
2 views
in Web Technology by (47.6k points)

I follow all the steps mention in mongodb installation documents.

for ubuntu 16.04

steps 1:

sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv 2930ADAE8CAF5059EE73BB4B58712A2291FA4AD5

steps 2:

echo "deb [ arch=amd64,arm64 ] https://repo.mongodb.org/apt/ubuntu xenial/mongodb-org/3.6 multiverse" | sudo tee /etc/apt/sources.list.d/mongodb-org-3.6.list

steps 3:

sudo apt-get update

steps 4:

sudo apt-get install -y mongodb-org

steps 5:

sudo service mongod start

when I started mongodb got an error as

"Failed to start mongod.service: Unit mongod.service not found." please help me to solve this.

1 Answer

0 votes
by (106k points)

To start mongod service you should use unit mongodb.service is masked. Use the following command to unmask it.

sudo systemctl unmask mongodb

and after that re-run the below-mentioned command:-

sudo service mongod start

Related questions

0 votes
1 answer
0 votes
2 answers
asked Oct 17, 2019 in Web Technology by Sammy (47.6k points)
0 votes
2 answers
asked Oct 16, 2019 in Web Technology by Sammy (47.6k points)
0 votes
0 answers

31k questions

32.8k answers

501 comments

693 users

Browse Categories

...