2

While attempting to install a package via apt-get the following. The first error I get is:

    E: dpkg was interrupted, you must manually run 'sudo dpkg --configure -a' to correct the problem.

And, if I run that command the box spins out of control and I get the following in /var/log/syslog

Aug 29 20:21:08 ip-10-202-191-4 kernel: [20571563.398546] ------------[ cut here ]------------
Aug 29 20:21:08 ip-10-202-191-4 kernel: [20571563.398552] WARNING: at /build/buildd/linux-3.0.0/arch/x86/xen/multicalls.c:182 xen_mc_flush+01c0()
Aug 29 20:21:08 ip-10-202-191-4 kernel: [20571563.398561] Modules linked in: acpiphp
Aug 29 20:21:08 ip-10-202-191-4 kernel: [20571563.398568] Pid: 31063, comm: java Tainted: G      D W   3.0.0-14-virtual #23-Ubuntu
Aug 29 20:21:08 ip-10-202-191-4 kernel: [20571563.398576] Call Trace:
Aug 29 20:21:08 ip-10-202-191-4 kernel: [20571563.398580]  [<c0648265>] ? printk+0x2d/0x2f
Aug 29 20:21:08 ip-10-202-191-4 kernel: [20571563.398586]  [<c0150462>] warn_slowpath_common+0x72/0xa0
Aug 29 20:21:08 ip-10-202-191-4 kernel: [20571563.398593]  [<c0104883>] ? xen_mc_flush+0x1b3/0x1c0
Aug 29 20:21:08 ip-10-202-191-4 kernel: [20571563.398599]  [<c0104883>] ? xen_mc_flush+0x1b3/0x1c0
Aug 29 20:21:08 ip-10-202-191-4 kernel: [20571563.398605]  [<c01504b2>] warn_slowpath_null+0x22/0x30
Aug 29 20:21:08 ip-10-202-191-4 kernel: [20571563.398611]  [<c0104883>] xen_mc_flush+0x1b3/0x1c0
Aug 29 20:21:08 ip-10-202-191-4 kernel: [20571563.398617]  [<c0104e7a>] ? xen_extend_mmu_update+0x4a/0x70
Aug 29 20:21:08 ip-10-202-191-4 kernel: [20571563.398624]  [<c0106565>] xen_set_pud_hyper+0x75/0x80
Aug 29 20:21:08 ip-10-202-191-4 kernel: [20571563.398630]  [<c01065b9>] xen_set_pud+0x49/0x60
Aug 29 20:21:08 ip-10-202-191-4 kernel: [20571563.398636]  [<c0132105>] pud_populate+0x45/0x60
Aug 29 20:21:08 ip-10-202-191-4 kernel: [20571563.398642]  [<c0208a24>] __pmd_alloc+0x74/0x90
Aug 29 20:21:08 ip-10-202-191-4 kernel: [20571563.398648]  [<c0208cb7>] handle_mm_fault+0x277/0x2c0
Aug 29 20:21:08 ip-10-202-191-4 kernel: [20571563.398655]  [<c065f45b>] do_page_fault+0x15b/0x4a0
Aug 29 20:21:08 ip-10-202-191-4 kernel: [20571563.401923]  [<c020ba24>] ? remove_vma+0x44/0x60
Aug 29 20:21:08 ip-10-202-191-4 kernel: [20571563.401923]  [<c020d9b6>] ? sys_mmap_pgoff+0x106/0x1c0
Aug 29 20:21:08 ip-10-202-191-4 kernel: [20571563.401923]  [<c065f300>] ? vmalloc_fault+0x190/0x190
Aug 29 20:21:08 ip-10-202-191-4 kernel: [20571563.401923]  [<c065c79f>] error_code+0x67/0x6c
Aug 29 20:21:08 ip-10-202-191-4 kernel: [20571563.401923] ---[ end trace 0b105e2a179ad013 ]---
2
  • What are you trying to install?
    – Mitch
    Aug 30, 2012 at 6:04
  • At the moment 'rrdtool'
    – Jonathan
    Aug 30, 2012 at 13:00

1 Answer 1

3

The problem is that the script responsible for setting up the package(either the preinst or the postinst) has a command that causes a kernel panic, or just a kernel oops. Therefore, we must clean out the bad package to keep it from trying to run through dpkg and cause a crash again. To to so, just press Ctrl+Alt+T on your keyboard to open Terminal. When it opens, run the commands below, one by one.

sudo rm /var/lib/apt/lists/lock 

sudo cp -arf /var/lib/dpkg /var/lib/dpkg.backup

sudo mv /var/lib/dpkg/status /var/lib/dpkg/status-bad

sudo cp /var/lib/dpkg/status-old /var/lib/dpkg/status

sudo mv /var/lib/dpkg/available /var/lib/dpkg/available-bad

sudo cp /var/lib/dpkg/available-old /var/lib/dpkg/available

sudo rm -rf /var/lib/dpkg/updates/*

sudo rm -rf /var/lib/apt/lists

sudo rm /var/cache/apt/*.bin

sudo mkdir /var/lib/apt/lists

sudo mkdir /var/lib/apt/lists/partial

LANG=C;sudo apt-get clean

LANG=C;sudo apt-get autoclean

LANG=C;sudo apt-get --purge autoremove

LANG=C;sudo apt-get update

sudo dpkg --configure -a

(The above commands are complements of ObsessiveFOSS)

Once you do that, and all is OK, then proceed with the instructions below on how to install your package.

To install RRDTool, just press Ctrl+Alt+T on your keyboard to open Terminal. When it opens, run the command below. To make sure you have all the required dependencies.

sudo apt-get install libpango1.0-dev libxml2-dev

sudo apt-get install librrds-perl rrdtool

Or you can install it from the Ubuntu Software Center, by clicking below:

If the installation fails again, perform the repair steps listed above and file a bug against the package, stating that either the preinst or the postinst seems to cause a kernel panic.

5
  • Trying to install a package won't work if the package manager is broken and trying to fix it results in a kernel panic.
    – nanofarad
    Aug 30, 2012 at 13:22
  • @ObsessiveFOSS The OP is getting a dpkg error, installing using the above will solve it.
    – Mitch
    Aug 30, 2012 at 13:48
  • The error means that there is a package that failed midway through installation, and it needs to be either fully-installed or fully removed before anything else can be done. Trying to finish the installation causes a kernel panic, which is not a way to rectify the situation. If you would like to discuss this in chat, join the main room and ping me there.
    – nanofarad
    Aug 30, 2012 at 13:50
  • Could you explain what exactly these commands do? Are you removing some packages? This looks scary: "apt-get --purge autoremove", what does it do?
    – matteo
    Dec 5, 2015 at 0:31
  • 1
    @matteo apt-get --purge autoremove removes packages that were installed by other packages and are no longer needed. Other commands please see apt-get manpage.
    – Mitch
    Dec 5, 2015 at 7:09

Not the answer you're looking for? Browse other questions tagged .