5

Today I wanted to install virtualbox (4.2) in Ubuntu 12.10 and went to the Software Center. After clicking on the 'Install' button in the USC virtualbox was being downloaded and installed. I waited more than five minutes but nothing happened, and the progress bar didn't change. After about one hour of waiting I closed the USC and rebooted the PC.

Now I have got the problem that whenever I want to install software via sudo apt-get install <software> I get the following error:

quantal@Flubuntu:~$ sudo apt-get install <whatever-package>
E: Could not get lock /var/lib/dpkg/lock - open (11 Resource temporarily unavailable)
E: Unable to lock the administration directory (/var/lib/dpkg/), is another process using it?

After killing dpkg in terminal (sudo killall dpkg) or rebooting I get the next error:

quantal@Flubuntu:~$ sudo apt-get install <whatever-package>
E: dpkg was interrupted, you must manually run 'sudo dpkg --configure -a' to correct

And when I try to execute sudo dpkg --configure -a the command hangs at

update-initramfs: Generating /boot/initrd.img-3.5.0-25-generic

When I start sudo update-initramfs -k all -u -v in verbose mode it says that it adds many modules, binaries and firmware (which I have not included in the output) but then is stuck after the following six lines:

Adding binary /lib/firmware/radeon/TAHITI_me.bin
Adding firmware radeon/TAHITI_me.bin
Adding binary /lib/firmware/radeon/TAHITI_pfp.bin
Adding firmware radeon/TAHITI_pfp.bin
Adding module /lib/modules/3.5.0-23-generic/kernel/drivers/gpu/drm/i2c/sil164.ko
Adding module /lib/modules/3.5.0-23-generic/kernel/drivers/gpu/drm/i2c/ch7006.ko

Blacklisting ch7006 or the module before doesn't work; I have also tried to manually rename ch7006.ko and sil164.ko (after checking that it isn't necessary for the system) but then it is stuck at the line before.

Many thanks in advance!

Further information:

NOTE: When booting Ubuntu I get NO errors or so, so the kernel boots but I cannot update it (and apt-get install doesn't want to install software as long as this problem exists).

The output of uname -a:

Linux Flubuntu 3.5.0-23-generic #35-Ubuntu SMP Thu Jan 24 13:15:40 UTC 2013 x86_64 x86_64 x86_64 GNU/Linux
4

Okay, I have found a workaround to fix this error.

  1. After I executed the steps in my question, I tried to remove the kernel with:

    sudo update-initramfs -k 3.5.0-23-generic -d
    
  2. After a reboot GRUB showed up and selected my version of Ubuntu but when it tried to load the kernel, it said

    Kernel panic - not syncing: VFS: Unable to mount root fs on unknown-block (0,0)

  3. Then I just chrooted with a LiveCD into Ubuntu and executed:

    sudo dpkg --configure -a
    sudo apt-get install linux-image-3.5.0-25-generic
    

    And after a reboot everything was OK.

  • Step 2 sounds to be likely unnecessary. Instead you can directly run sudo apt-get install -f from the currently running system (no need to reboot or use a live system) after update-initramfs -d. – David Foerster Sep 5 '18 at 17:29
1

Today I've also encountered this error and removing then reinstalling initramfs-tools have fixed the hangs I've been experiencing.

sudo apt remove initramfs-tools
sudo apt install initramfs-tools

In my case, it was probably some configuration or a temporary file was broken / locked for initramfs-tools.

This was on Ubuntu 18.04 so it can still happen.

0

Step 2 of slashcrack’s sounds largely unnecessary. Instead it should suffice to run

sudo update-initramfs -d -k <VERSION>
sudo apt-get install -f

where you replace <VERSION> with the affected kernel version string (here: 3.5.0-23-generic).

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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