Ubuntu 16.04 post-install script fails

Tags:

#1 mattn

I'm attemping to install nxlog on a fresh Ubuntu 16.04 machine from nxlog-ce_2.9.1716_ubuntu_1604_amd64.deb. It seems to install correctly, however I get an error from the post-installation script.

Relevant output from 'dpkg -i nxlog-ce_2.9.1716_ubuntu_1604_amd64.deb':

Preparing to unpack nxlog-ce_2.9.1716_ubuntu_1604_amd64.deb ...
Unpacking nxlog-ce (2.9.1716) ...
Setting up nxlog-ce (2.9.1716) ...
[....] Starting nxlog (via systemctl): nxlog.serviceFailed to start nxlog.service: Unit nxlog.service not found.
 failed!
dpkg: error processing package nxlog-ce (--install):
 subprocess installed post-installation script returned error exit status 5

Running the dpkg command again, or just ignoring that it "failed" and running '/etc/init.d/nxlog start' afterwards both are successful.

Any idea why this is happening?

The dpkg command returning an error status is causing issues when performing the installation via an automation script.

#2 b0ti Nxlog ✓
#1 mattn
I'm attemping to install nxlog on a fresh Ubuntu 16.04 machine from nxlog-ce_2.9.1716_ubuntu_1604_amd64.deb. It seems to install correctly, however I get an error from the post-installation script. Relevant output from 'dpkg -i nxlog-ce_2.9.1716_ubuntu_1604_amd64.deb': Preparing to unpack nxlog-ce_2.9.1716_ubuntu_1604_amd64.deb ... Unpacking nxlog-ce (2.9.1716) ... Setting up nxlog-ce (2.9.1716) ... [....] Starting nxlog (via systemctl): nxlog.serviceFailed to start nxlog.service: Unit nxlog.service not found. failed! dpkg: error processing package nxlog-ce (--install): subprocess installed post-installation script returned error exit status 5 Running the dpkg command again, or just ignoring that it "failed" and running '/etc/init.d/nxlog start' afterwards both are successful. Any idea why this is happening? The dpkg command returning an error status is causing issues when performing the installation via an automation script.

This has been reported before. It seems to be an issue related to systemd but it does not always manifest.