in my WSL apt upgrade
crashed because of a problem with mongodb-org-server.
I use WSL2 with Ubuntu 20.04. (The same error also appeared in WSL1 with Ubuntu 18.04 before I upgraded my WSL recently.)
Here is the output of apt upgrade
:
[...]Setting up mongodb-org-server (4.2.11) ...############################################################################################..............................]System has not been booted with systemd as init system (PID 1). Can't operate.##############################################################........................]Failed to connect to bus: Host is downdpkg: error processing package mongodb-org-server (--configure): installed mongodb-org-server package post-installation script subprocess returned error exit status 1dpkg: 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 unconfiguredNo 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) ...Processing triggers for libc-bin (2.31-0ubuntu9.1) ...Errors were encountered while processing: mongodb-org-server mongodb-orgE: Sub-process /usr/bin/dpkg returned an error code (1)
With the help of this thread I figured out that the error comes from the file /var/lib/dpkg/info/mongodb-org-server.postinst
, specifically from
# Check for changes to the service filesystemctl daemon-reload
because systemd is not available in WSL.
I commented out that line and now apt upgrade
runs through.
So here is my question: Is it okay to just comment it out or can this cause problems? I'm kind of a newbie to Ubuntu and don't really know what I'm doing there.