gzip: stdout: No space left on device E: mkinitramfs failure find 141 cpio 141 gzip 1

版权声明:本文为博主原创文章,未经博主允许不得转载。 https://blog.csdn.net/w5688414/article/details/79952389

今天一开电脑,发现boot空间不够了,然后 运行下面的命令的时候,出现了如下的错误:

sudo apt-get -f install
gzip: stdout: No space left on device
E: mkinitramfs failure find 141 cpio 141 gzip 1
update-initramfs: failed for /boot/initrd.img-4.13.0-37-generic with 1.
dpkg: error processing package linux-firmware (--configure):
 subprocess installed post-installation script returned error exit status 1
Setting up linux-image-4.13.0-38-generic (4.13.0-38.43~16.04.1) ...
Running depmod.
update-initramfs: deferring update (hook will be called later)
Examining /etc/kernel/postinst.d.
run-parts: executing /etc/kernel/postinst.d/apt-auto-removal 4.13.0-38-generic /boot/vmlinuz-4.13.0-38-generic
run-parts: executing /etc/kernel/postinst.d/dkms 4.13.0-38-generic /boot/vmlinuz-4.13.0-38-generic
run-parts: executing /etc/kernel/postinst.d/initramfs-tools 4.13.0-38-generic /boot/vmlinuz-4.13.0-38-generic
update-initramfs: Generating /boot/initrd.img-4.13.0-38-generic

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

dpkg: error processing package linux-image-extra-4.13.0-38-generic (--configure):
 dependency problems - leaving unconfigured
dpkg: dependency problems prevent configuration of linux-image-generic-hwe-16.04:
 linux-image-generic-hwe-16.04 depends on linux-image-4.13.0-38-generic; however:
  Package linux-image-4.13.0-38-generic is not configured yet.
 linux-image-generic-hwe-16.04 depends on linux-image-extra-4.13.0-38-generic; however:
  Package linux-image-extra-4.13.0-38-generic is not configured yet.
 linux-image-generic-hwe-16.04 depends on linux-firmware; however:
  Package linux-firmware is not configured yet.

dpkg: error processing package linux-image-generic-hwe-16.04 (--configure):
 dependency problems - leaving unconfigured
Setting up linux-headeNo apport report written because the error message indicates its a followup error from a previous failure.
                                                No apport report written because MaxReports is reached already
                              rs-4.13.0-38 (4.13.0-38.43~16.04.1) ...
Setting up linux-headers-4.13.0-38-generic (4.13.0-38.43~16.04.1) ...
Examining /etc/kernel/header_postinst.d.
run-parts: executing /etc/kernel/header_postinst.d/dkms 4.13.0-38-generic /boot/vmlinuz-4.13.0-38-generic
Setting up linux-headers-generic-hwe-16.04 (4.13.0.38.57) ...
dpkg: dependency problems prevent configuration of linux-generic-hwe-16.04:
 linux-generic-hwe-16.04 depends on linux-image-generic-hwe-16.04 (= 4.13.0.38.57); however:
  Package linux-image-generic-hwe-16.04 is not configured yet.

dpkg: error processing package linux-generic-hwe-16.04 (--configure):
 dependency problems - leaving unconfigured
Setting up linux-image-extra-4.13.0-37-generic (4.13.0-37.42~16.04.1) ...
No apport report written because MaxReports is reached already
                                                              run-parts: executing /etc/kernel/postinst.d/apt-auto-removal 4.13.0-37-generic /boot/vmlinuz-4.13.0-37-generic
run-parts: executing /etc/kernel/postinst.d/dkms 4.13.0-37-generic /boot/vmlinuz-4.13.0-37-generic
run-parts: executing /etc/kernel/postinst.d/initramfs-tools 4.13.0-37-generic /boot/vmlinuz-4.13.0-37-generic
update-initramfs: Generating /boot/initrd.img-4.13.0-37-generic

gzip: stdout: No space left on device
E: mkinitramfs failure find 141 cpio 141 gzip 1
update-initramfs: failed for /boot/initrd.img-4.13.0-37-generic with 1.
run-parts: /etc/kernel/postinst.d/initramfs-tools exited with return code 1
dpkg: error processing package linux-image-extra-4.13.0-37-generic (--configure):
 subprocess installed post-installation script returned error exit status 1
No apport report written because MaxReports is reached already
                                                              Setting up linux-libc-dev:amd64 (4.4.0-119.143) ...
Processing triggers for initramfs-tools (0.122ubuntu8.10) ...
update-initramfs: Generating /boot/initrd.img-4.13.0-37-generic

gzip: stdout: No space left on device
E: mkinitramfs failure find 141 cpio 141 gzip 1
update-initramfs: failed for /boot/initrd.img-4.13.0-37-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
                                                              Processing triggers for libc-bin (2.23-0ubuntu10) ...
Errors were encountered while processing:
 linux-firmware
 linux-image-4.13.0-38-generic
 linux-image-extra-4.13.0-38-generic
 linux-image-generic-hwe-16.04
 linux-generic-hwe-16.04
 linux-image-extra-4.13.0-37-generic
 initramfs-tools
E: Sub-process /usr/bin/dpkg returned an error code (1)

我的方式是直接跳转到boot目录下删除点东西:

cd /boot
ls

我显示的内容是:

abi-4.13.0-26-generic         initrd.img-4.13.0-37-generic
abi-4.13.0-31-generic         lost+found
abi-4.13.0-32-generic         memtest86+.bin
abi-4.13.0-36-generic         memtest86+.elf
abi-4.13.0-37-generic         memtest86+_multiboot.bin
abi-4.13.0-38-generic         retpoline-4.13.0-36-generic
config-4.13.0-26-generic      retpoline-4.13.0-37-generic
config-4.13.0-31-generic      retpoline-4.13.0-38-generic
config-4.13.0-32-generic      System.map-4.13.0-37-generic
config-4.13.0-36-generic      System.map-4.13.0-38-generic
config-4.13.0-37-generic      vmlinuz-4.13.0-26-generic
config-4.13.0-38-generic      vmlinuz-4.13.0-31-generic
grub                          vmlinuz-4.13.0-32-generic
initrd.img-4.13.0-26-generic  vmlinuz-4.13.0-36-generic
initrd.img-4.13.0-31-generic  vmlinuz-4.13.0-37-generic
initrd.img-4.13.0-32-generic  vmlinuz-4.13.0-38-generic
initrd.img-4.13.0-36-generic

然后我删了一点,空出点空间,自己根据自己的情况删吧:

sudo rm System.map-4.13.0-37-generic
sudo rm config-4.13.0-31-generic
sudo rm vmlinuz-4.13.0-26-generic

最后运行:

sudo apt-get autoremove
就恢复正常了。


阅读更多

扫码向博主提问

农民小飞侠

非学,无以致疑;非问,无以广识
去开通我的Chat快问
想对作者说点什么?

博主推荐

换一批

没有更多推荐了,返回首页