无法在 ubuntu Linux 上安装任何软件包

无法在 ubuntu Linux 上安装任何软件包
root@osboxes:~# apt install gcc
Reading package lists... Done
Building dependency tree       
Reading state information... Done
gcc is already the newest version (4:9.3.0-1ubuntu2).
0 upgraded, 0 newly installed, 0 to remove and 332 not upgraded.
1 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.136ubuntu6) ...
update-initramfs: deferring update (trigger activated)
Processing triggers for initramfs-tools (0.136ubuntu6) ...
update-initramfs: Generating /boot/initrd.img-5.8.9
I: The initramfs will attempt to resume from /dev/sda3
I: (UUID=0678741e-d2a3-4fda-bc4e-e3ceb5d4d297)
I: Set the RESUME variable to override this.
Error 24 : Write error : cannot write compressed block 
E: mkinitramfs failure cpio 141 lz4 -9 -l 24
update-initramfs: failed for /boot/initrd.img-5.8.9 with 1.
dpkg: error processing package initramfs-tools (--configure):
 installed initramfs-tools package post-installation script subprocess returned 
error exit status 1
Errors were encountered while processing:
 initramfs-tools
E: Sub-process /usr/bin/dpkg returned an error code (1)
root@osboxes:~# 

我在 VirtualBox 上运行 Ubuntu,我已经使用该操作系统一段时间了,一切似乎都很好。但今天我尝试安装一些软件包时,却一直收到这个奇怪的错误。我尝试使用 apt-get 或 apt install 命令安装的任何东西似乎都弹出同样的错误。我留下了命令行的图像:

命令行图片

df 和 ls -l /boot 命令

df 命令输出

ls -l/boot 命令

答案1

问题是由于启动分区已满,没有空间造成的。我通过增加启动分区的大小解决了这个问题。(请注意,如果启动分区右侧有一个交换分区,则需要先将其删除,然后才能增加启动分区的大小)

相关内容