-   Debian (
-   -   SOLVED: Upgrade error: Sub-process /usr/bin/dpkg returned an error code (1) (

jlb0057 02-21-2009 09:54 AM

SOLVED: Upgrade error: Sub-process /usr/bin/dpkg returned an error code (1)
When trying apt-get dist-upgrade I got the following:


Unpacking linux-image-2.6.26-1-686 (from .../linux-image-2.6.26-1-686_2.6.26-13_i386.deb) ...
dpkg: error processing /var/cache/apt/archives/linux-image-2.6.26-1-686_2.6.26-13_i386.deb (--unpack):
failed in buffer_write(fd) (10, ret=-1): backend dpkg-deb during `./lib/modules/2.6.26-1-686/kernel/drivers/media/video/zc0301/zc0301.ko': No space left on device
dpkg-deb: subprocess paste killed by signal (Broken pipe)
Running postrm hook script /sbin/update-grub.
Searching for GRUB installation directory ... found: /boot/grub
Searching for default file ... found: /boot/grub/default
Testing for an existing GRUB menu.lst file ... found: /boot/grub/menu.lst
Searching for splash image ... none found, skipping ...
Found kernel: /boot/vmlinuz-2.6.21-2-686
Found kernel: /boot/vmlinuz-2.6.18-4-686
Found kernel: /boot/vmlinuz-2.6.18-3-686
Updating /boot/grub/menu.lst ... done

Preparing to replace passwd 1: (using .../passwd_1%3a4.1.1-6_i386.deb) ...
Unpacking replacement passwd ...
Processing triggers for man-db ...
Errors were encountered while processing:
E: Sub-process /usr/bin/dpkg returned an error code (1)
I was ready to post on LQ when I came across the link below which advised:


If you have more than 1 kernel installed try removing (using synaptic or apt-get) all kernels but the newest. After that do the dist-upgrade once more.

If it doesn't work boot from a livecd and resize your /boot partition into at leest 100 mb.

This worked! I was back in business after doing:

$ sudo apt-get remove linux-image-2.6.18*
$ sudo apt-get dist-upgrade
I only post this here, because I hit several dead ends on the Google road before coming across this one.

AlucardZero 02-21-2009 12:09 PM

Yeah "No space left on device" was a good clue.

jlb0057 02-21-2009 03:38 PM

Yes, it seems elementary in retrospect, but my overall disk space looked good. Of course, the boot partition was the problem, but I was not savvy enough to catch that without some guidance.

khemraj 03-11-2011 08:37 AM

Upgrade error: Sub-process /usr/bin/dpkg returned an error code (1)
if any one not understand this which script should edit
then plz open the file in /var/lib/dpkg/<trouble package>.prerm
and remove the set -e line in that script.
same for file
/var/lib/dpkg/info/<trouble package>.postrm also.
n done.

All times are GMT -5. The time now is 11:53 PM.