Azure ubuntu suddenly corrupted, won't apt-get update

Asked by Mitch Wyle

root@elw:~# ubuntu-support-status
Support status summary of 'elw':

You have 497 packages (93.6%) supported until May 2019 (5y)
You have 23 packages (4.3%) supported until February 2015 (9m)

You have 0 packages (0.0%) that can not/no-longer be downloaded
You have 11 packages (2.1%) that are unsupported

Run with --show-unsupported, --show-supported or --show-all to see more details
root@elw:~#
root@elw:~# cat /etc/dpkg/dpkg.cfg.d/multiarch
cat: /etc/dpkg/dpkg.cfg.d/multiarch: No such file or directory
root@elw:~#
root@elw:~# dpkg --print-foreign-architectures
root@elw:~#
root@elw:~# sudo grep -R proxy /etc/apt/*
root@elw:~#
root@elw:~# grep proxy /etc/environment
root@elw:~#
root@elw:~# echo $http_proxy

root@elw:~#
root@elw:~# echo $ftp_proxy

root@elw:~#
root@elw:~# grep proxy /etc/bash.bashrc
root@elw:~#
root@elw:~# grep proxy ~/.bashrc
root@elw:~#
root@elw:~# cat /etc/apt/apt.conf
cat: /etc/apt/apt.conf: No such file or directory
root@elw:~#
root@elw:~# sudo fuser -vvv /var/lib/dpkg/lock
root@elw:~#
root@elw:~# sudo fuser -vvv /var/cache/apt/archives/lock
root@elw:~#
root@elw:~# cat /etc/lsb-release
DISTRIB_ID=Ubuntu
DISTRIB_RELEASE=14.04
DISTRIB_CODENAME=trusty
DISTRIB_DESCRIPTION="Ubuntu 14.04.4 LTS"
root@elw:~#
root@elw:~# uname -a
Linux elw 3.13.0-24-generic #47-Ubuntu SMP Fri May 2 23:30:00 UTC 2014 x86_64 x86_64 x86_64 GNU/Linux
root@elw:~#
root@elw:~# sudo rm /var/lib/apt/lists/lock
rm: cannot remove ‘/var/lib/apt/lists/lock’: No such file or directory
root@elw:~#
root@elw:~# sudo rm /var/cache/apt/archives/lock
root@elw:~#
root@elw:~# sudo rm /var/lib/dpkg/lock
root@elw:~#
root@elw:~# sudo cp -arf /var/lib/dpkg /var/lib/dpkg.backup
root@elw:~#
root@elw:~# sudo mv /var/lib/dpkg/status /var/lib/dpkg/status-bad
root@elw:~#
root@elw:~# sudo cp /var/lib/dpkg/status-old /var/lib/dpkg/status || sudo cp /var/backups/apt.extended_states.0 /var/lib/dpkg/status
root@elw:~#
root@elw:~# sudo mv /var/lib/dpkg/available /var/lib/dpkg/available-bad
root@elw:~#
root@elw:~# sudo cp /var/lib/dpkg/available-old /var/lib/dpkg/available
root@elw:~#
root@elw:~# sudo rm -rf /var/lib/dpkg/updates/*
root@elw:~#
root@elw:~# sudo rm -rf /var/lib/apt/lists
root@elw:~#
root@elw:~# sudo rm /var/cache/apt/*.bin
root@elw:~#
root@elw:~# sudo mkdir /var/lib/apt/lists
root@elw:~#
root@elw:~# sudo mkdir /var/lib/apt/lists/partial
root@elw:~#
root@elw:~# LANG=C;sudo apt-get clean
root@elw:~#
root@elw:~# LANG=C;sudo apt-get autoclean
Reading package lists... Done
Building dependency tree
Reading state information... Done
root@elw:~#
root@elw:~# sudo dpkg --configure -a
Setting up linux-cloud-tools-common (3.13.0-83.127) ...
invoke-rc.d: unknown initscript, /etc/init.d/hv-kvp-daemon not found.
/usr/sbin/invoke-rc.d: 1: /usr/sbin/invoke-rc.d: /sbin/runlevel: not found
dpkg: error processing package linux-cloud-tools-common (--configure):
 subprocess installed post-installation script returned error exit status 100
Setting up udev (204-5ubuntu20.18) ...
/usr/sbin/invoke-rc.d: 1: /usr/sbin/invoke-rc.d: /sbin/runlevel: not found
 * Stopping the hotplug events dispatcher udevd [ OK ]
 * Starting the hotplug events dispatcher udevd [ OK ]
/var/lib/dpkg/info/udev.postinst: 25: /var/lib/dpkg/info/udev.postinst: update-initramfs: not found
dpkg: error processing package udev (--configure):
 subprocess installed post-installation script returned error exit status 127
Setting up squid3 (3.3.8-1ubuntu6.6) ...
Creating Squid HTTP proxy 3.x spool directory structure
2016/03/26 17:28:22| Squid is already running! Process ID 1479
invoke-rc.d: unknown initscript, /etc/init.d/squid3 not found.
/usr/sbin/invoke-rc.d: 1: /usr/sbin/invoke-rc.d: /sbin/runlevel: not found
invoke-rc.d: unknown initscript, /etc/init.d/squid3 not found.
/usr/sbin/invoke-rc.d: 1: /usr/sbin/invoke-rc.d: /sbin/runlevel: not found
dpkg: error processing package squid3 (--configure):
 subprocess installed post-installation script returned error exit status 100
dpkg: dependency problems prevent configuration of linux-cloud-tools-3.13.0-83:
 linux-cloud-tools-3.13.0-83 depends on linux-cloud-tools-common; however:
  Package linux-cloud-tools-common is not configured yet.

dpkg: error processing package linux-cloud-tools-3.13.0-83 (--configure):
 dependency problems - leaving unconfigured
dpkg: dependency problems prevent configuration of linux-cloud-tools-3.13.0-83-generic:
 linux-cloud-tools-3.13.0-83-generic depends on linux-cloud-tools-3.13.0-83; however:
  Package linux-cloud-tools-3.13.0-83 is not configured yet.

dpkg: error processing package linux-cloud-tools-3.13.0-83-generic (--configure):
 dependency problems - leaving unconfigured
dpkg: dependency problems prevent configuration of linux-cloud-tools-virtual:
 linux-cloud-tools-virtual depends on linux-cloud-tools-3.13.0-83-generic; however:
  Package linux-cloud-tools-3.13.0-83-generic is not configured yet.

dpkg: error processing package linux-cloud-tools-virtual (--configure):
 dependency problems - leaving unconfigured
Errors were encountered while processing:
 linux-cloud-tools-common
 udev
 squid3
 linux-cloud-tools-3.13.0-83
 linux-cloud-tools-3.13.0-83-generic
 linux-cloud-tools-virtual
root@elw:~#
root@elw:~# sudo dpkg --clear-avail
root@elw:~#
root@elw:~# LANG=C;sudo apt-get -f install
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following package was automatically installed and is no longer required:
  linux-cloud-tools-3.13.0-24
Use 'apt-get autoremove' to remove it.
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
6 not fully installed or removed.
After this operation, 0 B of additional disk space will be used.
Setting up udev (204-5ubuntu20.18) ...
/usr/sbin/invoke-rc.d: 1: /usr/sbin/invoke-rc.d: /sbin/runlevel: not found
 * Stopping the hotplug events dispatcher udevd [ OK ]
 * Starting the hotplug events dispatcher udevd [ OK ]
/var/lib/dpkg/info/udev.postinst: 25: /var/lib/dpkg/info/udev.postinst: update-initramfs: not found
dpkg: error processing package udev (--configure):
 subprocess installed post-installation script returned error exit status 127
Setting up linux-cloud-tools-common (3.13.0-83.127) ...
invoke-rc.d: unknown initscript, /etc/init.d/hv-kvp-daemon not found.
/usr/sbin/invoke-rc.d: 1: /usr/sbin/invoke-rc.d: /sbin/runlevel: not found
dpkg: error processing package linux-cloud-tools-common (--configure):
 subprocess installed post-installation script returned error exit status 100
dpkg: dependency problems prevent configuration of linux-cloud-tools-3.13.0-83:
 linux-cloud-tools-3.13.0-83 depends on linux-cloud-tools-common; however:
  Package linux-cloud-tools-common is not configured yet.

dpkg: error processing package linux-cloud-tools-3.13.0-83 (--configure):
 dependency problems - leaving unconfigured
No apport report written because the error message indicates its a followup error from a previous failure.
                                                                                                          dpkg: dependency problems prevent configuration of linux-cloud-tools-3.13.0-83-generic:
 linux-cloud-tools-3.13.0-83-generic depends on linux-cloud-tools-3.13.0-83; however:
  Package linux-cloud-tools-3.13.0-83 is not configured yet.

dpkg: error processing package linux-cloud-tools-3.13.0-83-generic (--configure):
 dependency problems - leaving unconfigured
No apport report written because MaxReports is reached already
                                                              dpkg: dependency problems prevent configuration of linux-cloud-tools-virtual:
 linux-cloud-tools-virtual depends on linux-cloud-tools-3.13.0-83-generic; however:
  Package linux-cloud-tools-3.13.0-83-generic is not configured yet.

dpkg: error processing package linux-cloud-tools-virtual (--configure):
 dependency problems - leaving unconfigured
No apport report written because MaxReports is reached already
                                                              Setting up squid3 (3.3.8-1ubuntu6.6) ...
Creating Squid HTTP proxy 3.x spool directory structure
2016/03/26 17:28:24| Squid is already running! Process ID 1479
invoke-rc.d: unknown initscript, /etc/init.d/squid3 not found.
/usr/sbin/invoke-rc.d: 1: /usr/sbin/invoke-rc.d: /sbin/runlevel: not found
invoke-rc.d: unknown initscript, /etc/init.d/squid3 not found.
/usr/sbin/invoke-rc.d: 1: /usr/sbin/invoke-rc.d: /sbin/runlevel: not found
dpkg: error processing package squid3 (--configure):
 subprocess installed post-installation script returned error exit status 100
No apport report written because MaxReports is reached already
                                                              Errors were encountered while processing:
 udev
 linux-cloud-tools-common
 linux-cloud-tools-3.13.0-83
 linux-cloud-tools-3.13.0-83-generic
 linux-cloud-tools-virtual
 squid3
E: Sub-process /usr/bin/dpkg returned an error code (1)

Question information

Language:
English Edit question
Status:
Answered
For:
Ubuntu apt Edit question
Assignee:
No assignee Edit question
Last query:
Last reply:
Revision history for this message
actionparsnip (andrew-woodhead666) said :
#1

If you run:

ubuntu-bug linux-cloud-tools-common

You can report a bug on the package.

Revision history for this message
actionparsnip (andrew-woodhead666) said :
#2

You can also use:

http://packages.ubuntu.com

To find the package that contains the hv-kvp-daemon file and manually install it using dpkg, then the update should work.

Can you help with this problem?

Provide an answer of your own, or ask Mitch Wyle for more information if necessary.

To post a message you must log in.