Reputation: 371
installing MongoDB on ubuntu wsl2
I tried to install MongoDB on WSL( ubuntu 20), after using this link but there is something wrong!
I don't know what the heck is: systemd :"System has not been booted with systemd as init system (PID 1)"
and how should I resolve that...
I'm totally beginner in Linux experience.
I've searched for this problem and apparently, people using DOCKTER in wsl had such a problem but I can't figure out how should I do in my case.
thanks
The whole error:
Setting up mongodb-org-server (4.4.4) ...
System has not been booted with systemd as init system (PID 1). Cant operate.
Failed to connect to bus: Host is down
dpkg: error processing package mongodb-org-server (--configure):
installed mongodb-org-server package post-installation script subprocess returned error exit status 1
Setting up mongodb-org-shell (4.4.4) ...
Setting up mongodb-org-mongos (4.4.4) ...
Setting up mongodb-org-database-tools-extra (4.4.4) ...
dpkg: dependency problems prevent configuration of mongodb-org:
mongodb-org depends on mongodb-org-server; however:
Package mongodb-org-server is not configured yet.
dpkg: error processing package mongodb-org (--configure):
dependency problems - leaving unconfigured
Setting up mongodb-org-tools (4.4.4) ...
No apport report written because the error message indicates its a followup error from a previous failure.
Processing triggers for man-db (2.9.1-1) ...
Errors were encountered while processing:
mongodb-org-server
mongodb-org
Upvotes: 0
Views: 6798
Reputation: 371
After lots of searches and trial and error, I found the only thing it apparently needs to do is: right after the MongoDB installation ("In this Lik"), we should set "systemctl" to enable! And then it needs to reboot your system.
sudo systemctl enable MongoDB
Upvotes: -1