E: Sub-process /usr/bin/dpkg returned an error code (1)

Asked by Randy Nyle Adamson on 2018-10-29

randy@randy-Inspiron-518:~$ sudo apt-get updates
[sudo] password for randy:
E: Invalid operation updates
randy@randy-Inspiron-518:~$ sudo apt-get update
Hit:1 http://us.archive.ubuntu.com/ubuntu xenial InRelease
Hit:2 http://archive.canonical.com/ubuntu xenial InRelease
Get:3 http://security.ubuntu.com/ubuntu xenial-security InRelease [107 kB]
Get:4 http://us.archive.ubuntu.com/ubuntu xenial-updates InRelease [109 kB]
Fetched 216 kB in 1s (147 kB/s)
Reading package lists... Done
randy@randy-Inspiron-518:~$ sudo apt-get upgrade
Reading package lists... Done
Building dependency tree
Reading state information... Done
Calculating upgrade... Done
The following packages have been kept back:
  linux-generic linux-headers-generic linux-image-generic
0 upgraded, 0 newly installed, 0 to remove and 3 not upgraded.
4 not fully installed or removed.
After this operation, 0 B of additional disk space will be used.
Do you want to continue? [Y/n] y
Setting up initramfs-tools (0.122ubuntu8.13) ...
update-initramfs: deferring update (trigger activated)
Setting up linux-image-extra-4.4.0-137-generic (4.4.0-137.163) ...
run-parts: executing /etc/kernel/postinst.d/apt-auto-removal 4.4.0-137-generic /boot/vmlinuz-4.4.0-137-generic
run-parts: executing /etc/kernel/postinst.d/initramfs-tools 4.4.0-137-generic /boot/vmlinuz-4.4.0-137-generic
update-initramfs: Generating /boot/initrd.img-4.4.0-137-generic

gzip: stdout: No space left on device
E: mkinitramfs failure cpio 141 gzip 1
update-initramfs: failed for /boot/initrd.img-4.4.0-137-generic with 1.
run-parts: /etc/kernel/postinst.d/initramfs-tools exited with return code 1
dpkg: error processing package linux-image-extra-4.4.0-137-generic (--configure):
 subprocess installed post-installation script returned error exit status 1
dpkg: dependency problems prevent configuration of linux-image-generic:
 linux-image-generic depends on linux-image-extra-4.4.0-137-generic; however:
  Package linux-image-extra-4.4.0-137-generic is not configured yet.

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

dpkg: error processing package linux-generic (--configure):
 dependency problems - leaving unconfigured
Processing triggers for initramfs-tools (0.122ubuntu8.13) ...
No apport report written because the error message indicates its a followup error from a previous failure.
                          No apport report written because the error message indicates its a followup error from a previous failure.
                                                    update-initramfs: Generating /boot/initrd.img-4.4.0-137-generic

gzip: stdout: No space left on device
E: mkinitramfs failure cpio 141 gzip 1
update-initramfs: failed for /boot/initrd.img-4.4.0-137-generic with 1.
dpkg: error processing package initramfs-tools (--configure):
 subprocess installed post-installation script returned error exit status 1
No apport report written because MaxReports is reached already
                                                              Errors were encountered while processing:
 linux-image-extra-4.4.0-137-generic
 linux-image-generic
 linux-generic
 initramfs-tools
E: Sub-process /usr/bin/dpkg returned an error code (1)
randy@randy-Inspiron-518:~$ sudo apt autoremove
Reading package lists... Done
Building dependency tree
Reading state information... Done
0 upgraded, 0 newly installed, 0 to remove and 3 not upgraded.
4 not fully installed or removed.
After this operation, 0 B of additional disk space will be used.
Setting up initramfs-tools (0.122ubuntu8.13) ...
update-initramfs: deferring update (trigger activated)
Setting up linux-image-extra-4.4.0-137-generic (4.4.0-137.163) ...
run-parts: executing /etc/kernel/postinst.d/apt-auto-removal 4.4.0-137-generic /boot/vmlinuz-4.4.0-137-generic
run-parts: executing /etc/kernel/postinst.d/initramfs-tools 4.4.0-137-generic /boot/vmlinuz-4.4.0-137-generic
update-initramfs: Generating /boot/initrd.img-4.4.0-137-generic

gzip: stdout: No space left on device
E: mkinitramfs failure cpio 141 gzip 1
update-initramfs: failed for /boot/initrd.img-4.4.0-137-generic with 1.
run-parts: /etc/kernel/postinst.d/initramfs-tools exited with return code 1
dpkg: error processing package linux-image-extra-4.4.0-137-generic (--configure):
 subprocess installed post-installation script returned error exit status 1
dpkg: dependency problems prevent configuration of linux-image-generic:
 linux-image-generic depends on linux-image-extra-4.4.0-137-generic; however:
  Package linux-image-extra-4.4.0-137-generic is not configured yet.

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

dpkg: error processing package linux-generic (--configure):
 dependency problems - leaving unconfigured
No apport report written because the error message indicates its a followup error from a previous failure.
                          No apport report written because the error message indicates its a followup error from a previous failure.
                                                    Processing triggers for initramfs-tools (0.122ubuntu8.13) ...
update-initramfs: Generating /boot/initrd.img-4.4.0-137-generic

gzip: stdout: No space left on device
E: mkinitramfs failure cpio 141 gzip 1
update-initramfs: failed for /boot/initrd.img-4.4.0-137-generic with 1.
dpkg: error processing package initramfs-tools (--configure):
 subprocess installed post-installation script returned error exit status 1
No apport report written because MaxReports is reached already
                                                              Errors were encountered while processing:
 linux-image-extra-4.4.0-137-generic
 linux-image-generic
 linux-generic
 initramfs-tools
E: Sub-process /usr/bin/dpkg returned an error code (1)
randy@randy-Inspiron-518:~$

Question information

Language:
English Edit question
Status:
Needs information
For:
Ubuntu adduser Edit question
Assignee:
No assignee Edit question
Last query:
2018-10-30
Last reply:
2018-10-30
Bashing-om (bashing-om) said : #1

Randy Nyle Adamson - Hello

As you have:
"gzip: stdout: No space left on device"

try terminal command ' sudo apt autoremove ' .

if and when that fails post back:
df -h
df -i
dpkg -l | grep linux-

See what we have to do manually .

-these things happen; when not paying attention-

This is what came up ?

randy@randy-Inspiron-518:~$ sudo apt autoremove
[sudo] password for randy:
Reading package lists... Done
Building dependency tree
Reading state information... Done
0 upgraded, 0 newly installed, 0 to remove and 3 not upgraded.
4 not fully installed or removed.
After this operation, 0 B of additional disk space will be used.
Setting up initramfs-tools (0.122ubuntu8.13) ...
update-initramfs: deferring update (trigger activated)
Setting up linux-image-extra-4.4.0-137-generic (4.4.0-137.163) ...
run-parts: executing /etc/kernel/postinst.d/apt-auto-removal 4.4.0-137-generic /boot/vmlinuz-4.4.0-137-generic
run-parts: executing /etc/kernel/postinst.d/initramfs-tools 4.4.0-137-generic /boot/vmlinuz-4.4.0-137-generic
update-initramfs: Generating /boot/initrd.img-4.4.0-137-generic

gzip: stdout: No space left on device
E: mkinitramfs failure cpio 141 gzip 1
update-initramfs: failed for /boot/initrd.img-4.4.0-137-generic with 1.
run-parts: /etc/kernel/postinst.d/initramfs-tools exited with return code 1
dpkg: error processing package linux-image-extra-4.4.0-137-generic (--configure):
 subprocess installed post-installation script returned error exit status 1
dpkg: dependency problems prevent configuration of linux-image-generic:
 linux-image-generic depends on linux-image-extra-4.4.0-137-generic; however:
  Package linux-image-extra-4.4.0-137-generic is not configured yet.

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

dpkg: error processing package linux-generic (--configure):
 dependency problems - leaving unconfigured
Processing triggers for initramfs-tools (0.122ubuntu8.13) ...
No apport report written because the error message indicates its a followup error from a previous failure.
                          No apport report written because the error message indicates its a followup error from a previous failure.
                                                    update-initramfs: Generating /boot/initrd.img-4.4.0-137-generic

gzip: stdout: No space left on device
E: mkinitramfs failure cpio 141 gzip 1
update-initramfs: failed for /boot/initrd.img-4.4.0-137-generic with 1.
dpkg: error processing package initramfs-tools (--configure):
 subprocess installed post-installation script returned error exit status 1
No apport report written because MaxReports is reached already
                                                              Errors were encountered while processing:
 linux-image-extra-4.4.0-137-generic
 linux-image-generic
 linux-generic
 initramfs-tools
E: Sub-process /usr/bin/dpkg returned an error code (1)
randy@randy-Inspiron-518:~$ df -h
Filesystem Size Used Avail Use% Mounted on
udev 2.0G 0 2.0G 0% /dev
tmpfs 395M 6.3M 388M 2% /run
/dev/mapper/ubuntu--vg-root 583G 56G 498G 11% /
tmpfs 2.0G 9.1M 2.0G 1% /dev/shm
tmpfs 5.0M 4.0K 5.0M 1% /run/lock
tmpfs 2.0G 0 2.0G 0% /sys/fs/cgroup
/dev/sda1 236M 203M 22M 91% /boot
cgmfs 100K 0 100K 0% /run/cgmanager/fs
tmpfs 395M 88K 395M 1% /run/user/1000
/home/randy/.Private 583G 56G 498G 11% /home/randy
randy@randy-Inspiron-518:~$ df -r
df: invalid option -- 'r'
Try 'df --help' for more information.
randy@randy-Inspiron-518:~$ df -i
Filesystem Inodes IUsed IFree IUse% Mounted on
udev 498845 522 498323 1% /dev
tmpfs 504434 766 503668 1% /run
/dev/mapper/ubuntu--vg-root 38797312 370531 38426781 1% /
tmpfs 504434 133 504301 1% /dev/shm
tmpfs 504434 7 504427 1% /run/lock
tmpfs 504434 18 504416 1% /sys/fs/cgroup
/dev/sda1 62248 321 61927 1% /boot
cgmfs 504434 14 504420 1% /run/cgmanager/fs
tmpfs 504434 38 504396 1% /run/user/1000
/home/randy/.Private 38797312 370531 38426781 1% /home/randy
randy@randy-Inspiron-518:~$
randy@randy-Inspiron-518:~$ dpkg -l | grep linux-
ii linux-base 4.5ubuntu1~16.04.1 all Linux image base package
ii linux-firmware 1.157.20 all Firmware for Linux kernel drivers
iU linux-generic 4.4.0.137.143 amd64 Complete Generic Linux kernel and headers
ii linux-headers-3.13.0-157 3.13.0-157.207 all Header files related to Linux kernel version 3.13.0
ii linux-headers-3.13.0-157-generic 3.13.0-157.207 amd64 Linux kernel headers for version 3.13.0 on 64 bit x86 SMP
ii linux-headers-3.13.0-24 3.13.0-24.47 all Header files related to Linux kernel version 3.13.0
ii linux-headers-3.13.0-24-generic 3.13.0-24.47 amd64 Linux kernel headers for version 3.13.0 on 64 bit x86 SMP

sudo apt autoremove did not correct this problem ! What I got is above.

Manfred Hampl (m-hampl) said : #4

What is the output of the commands

dpkg -l | grep linux-
ls -l /boot

In answer to your commands this is what I got !

ii syslinux-legacy 2:3.63+dfsg-2ubuntu8 amd64 Bootloader for Linux/i386 using MS-DOS floppies
randy@randy-Inspiron-518:~$ ls -l /boot
total 197835
-rw-r--r-- 1 root root 1169204 Aug 20 11:15 abi-3.13.0-157-generic
-rw-r--r-- 1 root root 1158016 May 2 2014 abi-3.13.0-24-generic
-rw-r--r-- 1 root root 1251923 Aug 15 10:48 abi-4.4.0-134-generic
-rw-r--r-- 1 root root 1251963 Sep 24 09:35 abi-4.4.0-137-generic
-rw-r--r-- 1 root root 166094 Aug 20 11:15 config-3.13.0-157-generic
-rw-r--r-- 1 root root 165510 May 2 2014 config-3.13.0-24-generic
-rw-r--r-- 1 root root 190624 Aug 15 10:48 config-4.4.0-134-generic
-rw-r--r-- 1 root root 190611 Sep 24 09:35 config-4.4.0-137-generic
drwxr-xr-x 5 root root 1024 Oct 29 13:41 grub
-rw-r--r-- 1 root root 35347034 Aug 22 19:57 initrd.img-3.13.0-157-generic
-rw-r--r-- 1 root root 34888565 Aug 22 19:58 initrd.img-3.13.0-24-generic
-rw-r--r-- 1 root root 42409813 Oct 16 19:11 initrd.img-4.4.0-134-generic
-rw-r--r-- 1 root root 42413179 Oct 20 14:10 initrd.img-4.4.0-137-generic
drwx------ 2 root root 12288 Aug 22 16:27 lost+found
-rw-r--r-- 1 root root 182704 Jan 28 2016 memtest86+.bin
-rw-r--r-- 1 root root 184380 Jan 28 2016 memtest86+.elf
-rw-r--r-- 1 root root 184840 Jan 28 2016 memtest86+_multiboot.bin
-rw-r--r-- 1 root root 254 Aug 20 11:15 retpoline-3.13.0-157-generic
-rw-r--r-- 1 root root 255 Aug 15 10:48 retpoline-4.4.0-134-generic
-rw-r--r-- 1 root root 255 Sep 24 09:35 retpoline-4.4.0-137-generic
-rw------- 1 root root 3416014 Aug 20 11:15 System.map-3.13.0-157-generic
-rw------- 1 root root 3372643 May 2 2014 System.map-3.13.0-24-generic
-rw------- 1 root root 3902867 Aug 15 10:48 System.map-4.4.0-134-generic
-rw------- 1 root root 3903049 Sep 24 09:35 System.map-4.4.0-137-generic
-rw------- 1 root root 5892240 Aug 20 11:15 vmlinuz-3.13.0-157-generic
-rw------- 1 root root 5776416 May 2 2014 vmlinuz-3.13.0-24-generic
-rw------- 1 root root 7161824 Aug 15 10:48 vmlinuz-4.4.0-134-generic
-rw------- 1 root root 7163584 Sep 24 09:35 vmlinuz-4.4.0-137-generic
randy@randy-Inspiron-518:~$

You can e-mail me your answer to <email address hidden> Thanks !

Manfred Hampl (m-hampl) said : #7

We need the full output of the command
dpkg -l | grep linux-
that we are able to help.

Can you help with this problem?

Provide an answer of your own, or ask Randy Nyle Adamson for more information if necessary.

To post a message you must log in.