Couchbase not installing on ubuntu 16.04

Hi Folks,
I am not able to install couchbase on ubuntu 16.04.

Failed to connect to bus: No such file or directory
dpkg: error processing package couchbase-server (--configure):
 subprocess installed post-installation script returned error exit status 1
dmesg: read kernel buffer failed: Function not implemented
                                                          Errors were encountered while processing:
 couchbase-server
E: Sub-process /usr/bin/dpkg returned an error code (1)

I did following steps to install couchbase:

wget https://packages.couchbase.com/releases/5.1.0/couchbase-server-enterprise_5.1.0-ubuntu16.04_amd64.deb
sudo apt-get update
sudo dpkg -i (filename).deb
sudo apt-get install -f

After this last command it gives an error:

Failed to connect to bus: No such file or directory
dpkg: error processing package couchbase-server (--configure):
 subprocess installed post-installation script returned error exit status 1
dmesg: read kernel buffer failed: Function not implemented
                                                          Errors were encountered while processing:
 couchbase-server
E: Sub-process /usr/bin/dpkg returned an error code (1)

It does not create couchbase service. When I do:

sudo service couchbase-server status

It gives:

couchbase-server: unrecognized service

Please help.

Thank you.

Please make sure your system have systemd running, if it is not, please restart your machine with systemd as pid 1 and retry.

Or use official docker image, instead of your own: https://hub.docker.com/r/couchbase/server/

Hi @avsej,

Thank you for response.

I think your solution will work but my ubuntu 16.04 instance does not have systemd. I tried to install and it is installed. I can see systemd file in /var/lib/systemd location. But it is not recognizing it.
and I want to use couchbase 5.1 enterprise edition only.

Can you guide me for this?

Thank you.

As you can see official docker images also use ubuntu 16.04, and disables starting server right after installation like this:

And run couchbase-server directly from scripts:

But i still would recommend just derive your Dockerfile from official couchbase image and add the layers you need.

FROM couchbase/server:latest