dpkg: 处理软件包 initramfs-tools 时出错

dpkg: 处理软件包 initramfs-tools 时出错

更新系统时出错。我尝试:

sudo apt-get upgrade
sudo apt-get install -f
sudo apt-get autoremove
sudo apt-get purge

输出:

Setting up initramfs-tools (0.122ubuntu8.1) ...
update-initramfs: deferring update (trigger activated)
Processing triggers for initramfs-tools (0.122ubuntu8.1) ...
update-initramfs: Generating /boot/initrd.img-4.6.2

gzip: stdout: No space left on device
E: mkinitramfs failure cpio 141 gzip 1
update-initramfs: failed for /boot/initrd.img-4.6.2 with 1.
dpkg: error processing package initramfs-tools (--configure):
 subprocess installed post-installation script returned error exit status 1
Errors were encountered while processing:
 initramfs-tools

我只安装了一个内核版本。

~$ ls /boot/
config-4.6.2      memtest86+.elf
grub              memtest86+_multiboot.bin
initrd.img-4.6.2  System.map-4.6.2
lost+found        vmlinuz-4.6.2
memtest86+.bin

我删除了所有未使用的内核和标头(不包括当前正在运行的内核):

sudo apt-get purge $(dpkg -l linux-{image,headers}-"[0-9]*" | awk '/ii/{print $2}' | grep -ve "$(uname -r | sed -r 's/-[a-z]+//')")

磁盘使用情况:

:/$ df -h /boot
Filesystem      Size  Used Avail Use% Mounted on
/dev/sda1       472M  329M  119M  74% /boot

如何解决这个问题?

相关内容