0

I recently upgraded from Ubuntu Server 14.04 to 16.04, the upgrade process was interrupted in the last step, after that I cannot use apt to install any software because of broken packages also the kernel was not upgraded.

apt-get upgrade gives me these errors

Errors were encountered while processing:
 cron
 initscripts
 procps
 udev
 plymouth
 mountall
 dbus
 accountsservice
 language-selector-common
 uuid-runtime
 apache2
 grub-common
 grub2-common
 grub-pc-bin
 grub-pc
 mysql-server-5.7
 ntp
 keyboard-configuration
 console-setup
 kbd
 console-setup-linux
 anacron
 logrotate
 resolvconf
 rsyslog
 irqbalance
 cgroup-lite
 cgmanager
 systemd-shim
 libpam-systemd:amd64
 plymouth-theme-ubuntu-text
 rsync
 ubuntu-standard
 acct
 at
 biosdevname
 screen
 policykit-1
 colord
 ipmitool
 netfilter-persistent
 iptables-persistent
 postfix
 iwatch
 logwatch
 lvm2
 mailutils
 mysql-server
 rpcbind
 nfs-common
 nfs-kernel-server
Processing was halted because there were too many errors.
E: Sub-process /usr/bin/dpkg returned an error code (1)

How can I resolve them please?

  • Did you tried sudo apt-get install -f? – N0rbert Aug 5 '18 at 12:28
  • @N0rbert Yes I tried and got the same output – Mohsen Ibrahim Aug 5 '18 at 13:23
2

I had another error which I did not post here and it appeared to be the one causing all these issues.

insserv: There is a loop between service monit and sshd-monit if stopped

I deleted /etc/init.d/sshd-monit and the problem was solved.

  • In another server I had also to delete /etc/init.d/hst too – Mohsen Ibrahim Aug 11 '18 at 13:25
  • On another server I had this issue insserv: Service mountdevsubfs has to be enabled to start service hwclock and it was resolved using rm /var/lib/dpkg/info/util-linux.postinst && apt-get dist-upgrade -f – Mohsen Ibrahim Aug 15 '18 at 10:01

Your Answer

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Not the answer you're looking for? Browse other questions tagged or ask your own question.