I'm trying to install couchbase-server-community on my Ubuntu 18.04 WSL 2 using the basic instructions from the Couchbase official website.

When running sudo apt install couchbase-server-community, I receive however

Unpacking couchbase-server-community (6.6.0-7909-1) ...
Setting up couchbase-server-community (6.6.0-7909-1) ...
System has not been booted with systemd as init system (PID 1). Can't operate.
dpkg: error processing package couchbase-server-community (--configure):
 installed couchbase-server-community package post-installation script subprocess returned error exit status 1
Errors were encountered while processing:
E: Sub-process /usr/bin/dpkg returned an error code (1)

How can I install and run the latest Couchbase for my Ubuntu version succesfully?

  • It appears that this package assumes systemd for its setup. WSL doesn't have systemd. This is the problem you need to solve. You could try to disable postinstall scripts and manually go through the postinstallation steps. Commented Mar 13, 2021 at 15:02

1 Answer 1


As @berndbausch mentioned in the comments, WSL does not support systemd at this time, and the couchbase package is definitely trying to use systemd.

In addition to @berndbausch's recommendation to try disabling the postinstall scripts, here are two other possibilities. Please note that I have not done either of these myself, but at least the first should be completely workable.

First, and probably easiest, would be to install Docker on your WSL2 Ubuntu distribution and use the Couchbase docker image.

Second, Couchbase also provides a "non-package-based" installation method. For potential future readers, this has been confirmed as working in WSL in the comments by @Avi, who asked the original question. However, it appears that setting the ulimit (as documented in the non-package-based install) currently requires a workaround in WSL. Before setting the ulimit, run su $USER. Note that raising the ulimit will only be valid in that subshell. See this Github comment and thread for more information.

  • 1
    Using the "non-package-based" installation worked, however I had to tinker a bit with it, since setting the ulimit up for my user means I also have to use this fix here: github.com/Microsoft/WSL/issues/1688 Just wanted to provide all details so that answer seeking people would have the whole story :)
    – Alex
    Commented Mar 15, 2021 at 19:57
  • 1
    Good to hear this worked! I'd love to edit the ulimit info into the answer, but I see multiple workarounds suggested on the issue you linked to. Which one worked for you specifically? Thanks! Commented Mar 16, 2021 at 0:47
  • 1
    Oh, sorry! I should have been more specific: What worked for me is github.com/Microsoft/WSL/issues/1688#issuecomment-605536435, which is basically logging in with your user (from your user as well, funny enough) aka su username :)
    – Alex
    Commented Mar 17, 2021 at 12:59

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .