无法解决未满足的依赖关系,因为 /boot 已满并且 apt install -f 无法完成

无法解决未满足的依赖关系,因为 /boot 已满并且 apt install -f 无法完成

我正在尝试安装 openvpn,但是我遇到了一个问题,Ubuntu 抱怨未满足的依赖关系:

[sudo] password for keith: 
Reading package lists... Done
Building dependency tree       
Reading state information... Done
You might want to run 'apt-get -f install' to correct these:
The following packages have unmet dependencies:
 linux-image-extra-4.4.0-71-generic : Depends: linux-image-4.4.0-71-generic but it is not going to be installed
 linux-signed-image-4.4.0-71-generic : Depends: linux-image-4.4.0-71-generic (= 4.4.0-71.92) but it is not going to be installed
 openvpn : Depends: libpkcs11-helper1 (>= 1.11) but it is not going to be installed
E: Unmet dependencies. Try 'apt-get -f install' with no packages (or specify a solution).

当我尝试运行 apt-get -f install 时遇到以下错误:

dpkg: error processing archive /var/cache/apt/archives/linux-image-4.4.0-71-generic_4.4.0-71.92_amd64.deb (--unpack):
cannot copy extracted data for './boot/System.map-4.4.0-71-generic' to '/boot/System.map-4.4.0-71-generic.dpkg-new': failed to write (No space left on device)
No apport report written because the error message indicates a disk full error

如果我运行,df -h我会看到以下内容:

Filesystem                    Size  Used Avail Use% Mounted on
udev                          208M     0  208M   0% /dev
tmpfs                          46M  5.2M   41M  12% /run
/dev/mapper/temptus--vg-root  8.3G  6.7G  1.2G  86% /
tmpfs                         228M  4.0K  228M   1% /dev/shm
tmpfs                         5.0M     0  5.0M   0% /run/lock
tmpfs                         228M     0  228M   0% /sys/fs/cgroup
/dev/sda2                     473M  470M     0 100% /boot
/dev/sda1                     511M  3.6M  508M   1% /boot/efi
tmpfs                          46M     0   46M   0% /run/user/1000
/home/keith/.Private          8.3G  6.7G  1.2G  86% /home/Keith

如你所见,/dev/sda2/boot)的使用率是 100%。我尝试了以下方法由于未满足依赖关系,无法清理完整的 /boot,这确实释放了空间/boot,但是当我删除旧内核并最终运行时apt-get -f install,所需的空间总是比我清除的空间更多。

例如,如果我在删除内核之前设法运行 apt-get -f install,它会告诉我需要 66.4mb 的可用空间。但是,如果我删除一个内核(例如 4.4.31),它会将可用空间增加到 122mb,并希望重新安装我删除的任何内核。

有没有办法强制删除内核并让 Ubuntu 运行后不重新安装sudo apt-get -f install

谢谢!

相关内容