When ever I am trying to install or uninstall any package in Ubuntu 16.04 I get the following error:
insserv: warning: script 'K02cups' missing LSB tags and overrides
insserv: warning: script 'cups' missing LSB tags and overrides
initctl: Unable to connect to Upstart: Failed to connect to socket /com/ubuntu/upstart: Connection refused
insserv: warning: script 'mongod' missing LSB tags and overrides
insserv: Default-Start undefined, assuming empty start runlevel(s) for script `mongod'
insserv: Default-Stop undefined, assuming empty stop runlevel(s) for script `mongod'
insserv: There is a loop at service plymouth if started
insserv: There is a loop between service smbd and urandom if started
insserv: loop involving service urandom at depth 4
insserv: loop involving service hwclock at depth 3
insserv: There is a loop between service cups and udev if started
insserv: loop involving service udev at depth 1
insserv: Starting cups depends on plymouth and therefore on system facility `$all' which can not be true!
insserv: Starting cups depends on plymouth and therefore on system facility `$all' which can not be true!
insserv: There is a loop between service smbd and cups if started
insserv: loop involving service cups at depth 6
insserv: loop involving service smbd at depth 5
insserv: loop involving service cgproxy at depth 2
insserv: Starting cups depends on plymouth and therefore on system facility `$all' which can not be true!
insserv: Starting cups depends on plymouth and therefore on system facility `$all' which can not be true!
insserv: There is a loop between service smbd and cups if started
insserv: loop involving service mountkernfs at depth 1
insserv: Starting cups depends on plymouth and therefore on system facility `$all' which can not be true!
insserv: Starting cups depends on plymouth and therefore on system facility `$all' which can not be true!
insserv: Starting cups depends on plymouth and therefore on system facility `$all' which can not be true!
insserv: Starting cups depends on plymouth and therefore on system facility `$all' which can not be true!
insserv: Starting cups depends on plymouth and therefore on system facility `$all' which can not be true!
insserv: Starting cups depends on plymouth and therefore on system facility `$all' which can not be true!
insserv: Starting cups depends on plymouth and therefore on system facility `$all' which can not be true!
insserv: Starting cups depends on plymouth and therefore on system facility `$all' which can not be true!
insserv: Starting cups depends on plymouth and therefore on system facility `$all' which can not be true!
insserv: Starting cups depends on plymouth and therefore on system facility `$all' which can not be true!
insserv: Starting cups depends on plymouth and therefore on system facility `$all' which can not be true!
insserv: Starting cups depends on plymouth and therefore on system facility `$all' which can not be true!
insserv: Starting cups depends on plymouth and therefore on system facility `$all' which can not be true!
insserv: Starting cups depends on plymouth and therefore on system facility `$all' which can not be true!
insserv: Starting cups depends on plymouth and therefore on system facility `$all' which can not be true!
insserv: Starting cups depends on plymouth and therefore on system facility `$all' which can not be true!
insserv: Starting cups depends on plymouth and therefore on system facility `$all' which can not be true!
insserv: Starting cups depends on plymouth and therefore on system facility `$all' which can not be true!
insserv: Starting cups depends on plymouth and therefore on system facility `$all' which can not be true!
insserv: Starting cups depends on plymouth and therefore on system facility `$all' which can not be true!
insserv: Starting cups depends on plymouth and therefore on system facility `$all' which can not be true!
insserv: Starting cups depends on plymouth and therefore on system facility `$all' which can not be true!
insserv: Starting cups depends on plymouth and therefore on system facility `$all' which can not be true!
insserv: Starting cups depends on plymouth and therefore on system facility `$all' which can not be true!
insserv: Starting cups depends on plymouth and therefore on system facility `$all' which can not be true!
insserv: Starting cups depends on plymouth and therefore on system facility `$all' which can not be true!
insserv: Starting cups depends on plymouth and therefore on system facility `$all' which can not be true!
insserv: Starting cups depends on plymouth and therefore on system facility `$all' which can not be true!
insserv: Starting cups depends on plymouth and therefore on system facility `$all' which can not be true!
insserv: Starting cups depends on plymouth and therefore on system facility `$all' which can not be true!
insserv: Starting cups depends on plymouth and therefore on system facility `$all' which can not be true!
insserv: Starting cups depends on plymouth and therefore on system facility `$all' which can not be true!
insserv: Starting cups depends on plymouth and therefore on system facility `$all' which can not be true!
insserv: Starting cups depends on plymouth and therefore on system facility `$all' which can not be true!
insserv: Starting cups depends on plymouth and therefore on system facility `$all' which can not be true!
insserv: Starting cups depends on plymouth and therefore on system facility `$all' which can not be true!
insserv: Starting cups depends on plymouth and therefore on system facility `$all' which can not be true!
insserv: Starting cups depends on plymouth and therefore on system facility `$all' which can not be true!
insserv: Starting cups depends on plymouth and therefore on system facility `$all' which can not be true!
insserv: Starting cups depends on plymouth and therefore on system facility `$all' which can not be true!
insserv: Starting cups depends on plymouth and therefore on system facility `$all' which can not be true!
insserv: Starting cups depends on plymouth and therefore on system facility `$all' which can not be true!
insserv: Starting cups depends on plymouth and therefore on system facility `$all' which can not be true!
insserv: Starting cups depends on plymouth and therefore on system facility `$all' which can not be true!
insserv: Starting cups depends on plymouth and therefore on system facility `$all' which can not be true!
insserv: Starting cups depends on plymouth and therefore on system facility `$all' which can not be true!
insserv: Starting cups depends on plymouth and therefore on system facility `$all' which can not be true!
insserv: Starting cups depends on plymouth and therefore on system facility `$all' which can not be true!
insserv: Starting cups depends on plymouth and therefore on system facility `$all' which can not be true!
insserv: Starting cups depends on plymouth and therefore on system facility `$all' which can not be true!
insserv: Starting cups depends on plymouth and therefore on system facility `$all' which can not be true!
insserv: Starting cups depends on plymouth and therefore on system facility `$all' which can not be true!
insserv: Starting cups depends on plymouth and therefore on system facility `$all' which can not be true!
insserv: Starting cups depends on plymouth and therefore on system facility `$all' which can not be true!
insserv: Starting cups depends on plymouth and therefore on system facility `$all' which can not be true!
insserv: Starting cups depends on plymouth and therefore on system facility `$all' which can not be true!
insserv: Starting cups depends on plymouth and therefore on system facility `$all' which can not be true!
insserv: Starting cups depends on plymouth and therefore on system facility `$all' which can not be true!
insserv: Max recursions depth 99 reached
insserv: exiting now without changing boot order!
update-rc.d: error: insserv rejected the script header
dpkg: error processing package util-linux (--configure):
subprocess installed post-installation script returned error exit status 1
Errors were encountered while processing:
util-linux
E: Sub-process /usr/bin/dpkg returned an error code (1)
I cannot seem to sort this out, any help or insights regarding this would be appreciated. Thanks
/etc/init.d/cups
for reference