2

running Ubuntu 12.04 LS and it tells me that it can't complete install on linux-image-3.5.39 because of dependencies. running 'apt-get -f install' doesn't do anything. How can I remove anything from "/boot" . It doesn't let me install anything, so I got to work with the packages I got.

uname -r --> linux 28.

suggestions are very much appreaciated

installArchives() failed: (Reading database ... 
(Reading database ... 5%
(Reading database ... 10%
(Reading database ... 15%
(Reading database ... 20%
(Reading database ... 25%
(Reading database ... 30%
(Reading database ... 35%
(Reading database ... 40%
(Reading database ... 45%
(Reading database ... 50%
(Reading database ... 55%
(Reading database ... 60%
(Reading database ... 65%
(Reading database ... 70%
(Reading database ... 75%
(Reading database ... 80%
(Reading database ... 85%
(Reading database ... 90%
(Reading database ... 95%
(Reading database ... 100%
(Reading database ... 291331 files and directories currently installed.)
Unpacking linux-image-3.5.0-39-generic (from .../linux-image-3.5.0-39-generic_3.5.0-39.60~precise1_amd64.deb) ...
Done.
dpkg: error processing /var/cache/apt/archives/linux-image-3.5.0-39-generic_3.5.0-39.60~precise1_amd64.deb (--unpack):
 failed in write on buffer copy for backend dpkg-deb during `./boot/vmlinuz-3.5.0-39-generic': No space left on device
No apport report written because the error message indicates a disk full error
dpkg-deb: error: subprocess paste was killed by signal (Broken pipe)
Examining /etc/kernel/postrm.d .
run-parts: executing /etc/kernel/postrm.d/initramfs-tools 3.5.0-39-generic /boot/vmlinuz-3.5.0-39-generic
run-parts: executing /etc/kernel/postrm.d/zz-update-grub 3.5.0-39-generic /boot/vmlinuz-3.5.0-39-generic
Errors were encountered while processing:
 /var/cache/apt/archives/linux-image-3.5.0-39-generic_3.5.0-39.60~precise1_amd64.deb
Error in function: 
SystemError: E:Sub-process /usr/bin/dpkg returned an error code (1)
Setting up initramfs-tools (0.99ubuntu13.1) ...
update-initramfs: deferring update (trigger activated)
dpkg: dependency problems prevent configuration of linux-image-generic-lts-quantal:
 linux-image-generic-lts-quantal depends on linux-image-3.5.0-39-generic; however:
  Package linux-image-3.5.0-39-generic is not installed.
dpkg: error processing linux-image-generic-lts-quantal (--configure):
 dependency problems - leaving unconfigured
dpkg: dependency problems prevent configuration of linux-generic-lts-quantal:
 linux-generic-lts-quantal depends on linux-image-generic-lts-quantal; however:
  Package linux-image-generic-lts-quantal is not configured yet.
dpkg: error processing linux-generic-lts-quantal (--configure):
 dependency problems - leaving unconfigured
Processing triggers for initramfs-tools ...
update-initramfs: Generating /boot/initrd.img-3.5.0-37-generic

gzip: stdout: No space left on device
cpio: write error: Broken pipe
E: mkinitramfs failure cpio 1 gzip 1
update-initramfs: failed for /boot/initrd.img-3.5.0-37-generic with 1.
dpkg: error processing initramfs-tools (--configure):
 subprocess installed post-installation script returned error exit status 1
Errors were encountered while processing:
 linux-image-generic-lts-quantal
 linux-generic-lts-quantal
 initramfs-tools
Alvar
  • 17,058
user187440
  • 41
  • 2
  • You remove packages with apt-get remove of course... – psusi Aug 26 '13 at 13:45
  • 1
    normally yes, but it doesn't let me and kicks back the 'try run apt-get -f install' which fails too. Feel like Linux is in a bad loop – user187440 Aug 26 '13 at 13:46
  • 3
    try dpkg -r linux-xxxx instead. – psusi Aug 26 '13 at 13:49
  • sorry being naive here, but what goes for linux-xxxx? – user187440 Aug 26 '13 at 14:07
  • the answer was in another thread: http://askubuntu.com/questions/324029/unable-to-remove-older-images-from-boot
    The only sane thing here is to free up some space. For example, manually remove the initrd image:

    sudo rm /boot/initrd.img-3.2.0-31-generic try sudo apt-get -f install again, then purge the package

    sudo apt-get -y purge linux-image-3.2.0-31-generic If you get another No space left on device remove one more initrd.img and try again."

    – user187440 Aug 26 '13 at 14:18

1 Answers1

0

The solution from @psusi works. One should first free up space by removing unused packets using the lower level dpkg command which isn't blocked by the problems apt has.

  1. sudo apt-get install --fix-broken should fail but list unused packets
  2. free them one by one using sudo dpkg --purge …. If a packet refuse to uninstall due to dependencies, just advance to the next one.
  3. After uninstalling everything you could, sudo apt-get install --fix-broken again, and this time it should work.

Just did it, solved the problem.

Offirmo
  • 161