0

Introduction

First of all, here's what I use: Ubuntu 16.04
I happened to install the package systemd-shim on my computer. However, it returned an error saying it could not be configured.

So for the time being I let it be just like that. However, whenever I want to perform any other operation using apt, it shows up in the list: 1 package not installed and yet it does not get installed properly even with a --reinstall command.

The problem

Then I decided that I'd simply remove it, using apt purge. However, that does not work either. Here's a part of the error I get:

insserv: Starting .depend.start depends on plymouth and therefore on system facility `$all' which can not be true!
insserv: There is a loop between service .depend.start and dns-clean if started
insserv:  loop involving service dns-clean at depth 1
insserv: exiting now without changing boot order!
update-rc.d: error: insserv rejected the script header
dpkg: error processing package cgmanager (--purge):
 subprocess installed post-removal script returned error exit status 1
Processing triggers for man-db (2.7.5-1) ...
Errors were encountered while processing:
 cgmanager
E: Sub-process /usr/bin/dpkg returned an error code (1)

The same is true regarding the package cgmanager, which was apparently also incompletely configured at the time of incomplete configuration of systemd-shim.

The same error occurs also when executing sudo apt install --reinstall mdadm, a step recommended by this answer:

insserv: Starting .depend.start depends on plymouth and therefore on system facility `$all' which can not be true!
insserv: There is a loop between service .depend.start and dns-clean if started
insserv:  loop involving service dns-clean at depth 1
insserv: Starting .depend.start depends on plymouth and therefore on system facility `$all' which can not be true!
insserv: exiting now without changing boot order!
update-rc.d: error: insserv rejected the script header
dpkg: error processing package mdadm (--configure):
 subprocess installed post-installation script returned error exit status 1
Processing triggers for systemd (229-4ubuntu16) ...
Processing triggers for ureadahead (0.100.0-19) ...
Errors were encountered while processing:
 mdadm
E: Sub-process /usr/bin/dpkg returned an error code (1)

I tried clearing the apt cache, i.e., the local directory where downloaded .deb packages are stored for them to be installed on the current/next run, but to no avail.

I am unable to find a solution anywhere specific to my situation, hence the question. Other questions (A, B) involve issues that have arisen during 16.04-->16.10 upgrade. However, I am using 16.04 and do not intend to upgrade my system in the near future. I had manually tried to install the package(s) and encountered the above-mentioned errors.

My system works properly and doesn't encounter any functional errors due to this, but it is better to resolve it than just leave it lying there, so I would appreciate any help that you can offer.

Update

I ran the command sudo dpkg --reconfigure -a and here's more such output:

W: mdadm: /etc/mdadm/mdadm.conf defines no arrays.
Processing triggers for plymouth-theme-ubuntu-text (0.9.2-3ubuntu13.1) ...
update-initramfs: deferring update (trigger activated)
Processing triggers for initramfs-tools (0.122ubuntu8.8) ...
update-initramfs: Generating /boot/initrd.img-4.4.0-62-generic
W: Possible missing firmware /lib/firmware/i915/kbl_dmc_ver1.bin for module i915_bpo
W: mdadm: /etc/mdadm/mdadm.conf defines no arrays.
Errors were encountered while processing:
 mdadm

Update [2017-02-22]
Here are the contents of mdadm.postinst file: Pastebin link.
Also, here is the output of dpkg -C:

The following packages are only half configured, probably due to problems
configuring them the first time.  The configuration should be retried using
dpkg --configure <package> or the configure menu option in dselect:
 keyboard-configuration system-wide keyboard preferences
 mdadm            tool to administer Linux MD arrays (software RAID)
9
  • AFAICT it's saying there's a fault with /etc/init.d/dns-clean. Or possibly plymouth. Ideally I would dump out the full loop from insserv, but I can't find how to do so!
    – sourcejedi
    Feb 9, 2017 at 16:54
  • The initramfs output doesn't look particularly relevant, I wouldn't worry about those Warning messages. Perhaps you can identify the package (dpkg-query -S /etc/init.d/dns-clean) and check for changes (debsums -a <package>). A systemwide check is also possible, although System V init scripts are categorized as editable configuration files, so they will be listed in with all the other modified configuration files and you will have to grep them out of the output. (debsums -a | grep /etc/init.d/).
    – sourcejedi
    Feb 9, 2017 at 16:54
  • To start with, I'd take a look at the post-install scripts that are failing. You can find them at /var/lib/dpkg/info/pkgname.postinst. Also, what is the output of dpkg -C? Results in the question, not in comments, please. Feb 9, 2017 at 18:06
  • sourcejedi, @Faheem Mitha: Thanks, I will check the things that you have mentioned and post relevant updates shortly.
    – axolotl
    Feb 9, 2017 at 18:10
  • @FaheemMitha I have updated the question, could you please check it out?
    – axolotl
    Feb 21, 2017 at 18:42

0

You must log in to answer this question.

Browse other questions tagged .