无法再安装任何东西,linux-image 的依赖项未得到满足-

无法再安装任何东西,linux-image 的依赖项未得到满足-

每当我尝试安装任何东西时,我都会收到以下消息:

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:
 clang : Depends: clang-3.4 (>= 3.4~rc3-1~) but it is not going to be installed
 linux-image-extra-3.16.0-52-generic : Depends: linux-image-3.16.0-52-generic but it is not going to be installed
 linux-image-extra-3.16.0-57-generic : Depends: linux-image-3.16.0-57-generic but it is not going to be installed
 linux-image-generic-lts-utopic : Depends: linux-image-3.16.0-57-generic but it is not going to be installed
E: Unmet dependencies. Try 'apt-get -f install' with no packages (or specify a solution).

然而,当我跑步时sudo apt-get -f install,我得到了这个

Reading package lists... Done
Building dependency tree       
Reading state information... Done
Correcting dependencies... Done
The following packages were automatically installed and are no longer required:
  erlang-asn1 erlang-base erlang-corba erlang-crypto erlang-diameter
  erlang-edoc erlang-eldap erlang-erl-docgen erlang-eunit erlang-ic
  erlang-inets erlang-mnesia erlang-nox erlang-odbc erlang-os-mon
  erlang-parsetools erlang-percept erlang-public-key erlang-runtime-tools
  erlang-snmp erlang-ssh erlang-ssl erlang-syntax-tools erlang-tools
  erlang-webtool erlang-xmerl libsctp1 linux-headers-3.16.0-30
  linux-headers-3.16.0-30-generic linux-headers-3.16.0-41
  linux-headers-3.16.0-41-generic linux-headers-3.16.0-43
  linux-headers-3.16.0-43-generic linux-headers-3.16.0-45
  linux-headers-3.16.0-45-generic linux-headers-3.16.0-48
  linux-headers-3.16.0-48-generic linux-headers-3.16.0-51
  linux-headers-3.16.0-51-generic linux-headers-3.16.0-52
  linux-headers-3.16.0-52-generic linux-image-3.16.0-30-generic
  linux-image-3.16.0-41-generic linux-image-3.16.0-43-generic
  linux-image-3.16.0-45-generic linux-image-3.16.0-48-generic
  linux-image-3.16.0-51-generic linux-image-3.16.0-52-generic
  linux-image-extra-3.16.0-30-generic linux-image-extra-3.16.0-41-generic
  linux-image-extra-3.16.0-43-generic linux-image-extra-3.16.0-45-generic
  linux-image-extra-3.16.0-48-generic linux-image-extra-3.16.0-51-generic
  linux-image-extra-3.16.0-52-generic lksctp-tools
Use 'apt-get autoremove' to remove them.
The following extra packages will be installed:
  linux-image-3.16.0-52-generic linux-image-3.16.0-57-generic
Suggested packages:
  fdutils linux-lts-utopic-tools
The following NEW packages will be installed:
  linux-image-3.16.0-52-generic linux-image-3.16.0-57-generic
0 upgraded, 2 newly installed, 0 to remove and 295 not upgraded.
10 not fully installed or removed.
Need to get 0 B/32.4 MB of archives.
After this operation, 90.2 MB of additional disk space will be used.
Do you want to continue? [Y/n] y
(Reading database ... 478639 files and directories currently installed.)
Preparing to unpack .../linux-image-3.16.0-57-generic_3.16.0-57.77~14.04.1_amd64.deb ...
Done.
Unpacking linux-image-3.16.0-57-generic (3.16.0-57.77~14.04.1) ...
dpkg: error processing archive /var/cache/apt/archives/linux-image-3.16.0-57-generic_3.16.0-57.77~14.04.1_amd64.deb (--unpack):
 cannot copy extracted data for './boot/abi-3.16.0-57-generic' to '/boot/abi-3.16.0-57-generic.dpkg-new': failed to write (No space left on device)
No apport report written because the error message indicates a disk full error
                                                                              dpkg-deb: error: subprocess paste was killed by signal (Broken pipe)
Examining /etc/kernel/postrm.d .
run-parts: executing /etc/kernel/postrm.d/initramfs-tools 3.16.0-57-generic /boot/vmlinuz-3.16.0-57-generic
run-parts: executing /etc/kernel/postrm.d/zz-update-grub 3.16.0-57-generic /boot/vmlinuz-3.16.0-57-generic
Preparing to unpack .../linux-image-3.16.0-52-generic_3.16.0-52.71~14.04.1_amd64.deb ...
Done.
Unpacking linux-image-3.16.0-52-generic (3.16.0-52.71~14.04.1) ...
dpkg: error processing archive /var/cache/apt/archives/linux-image-3.16.0-52-generic_3.16.0-52.71~14.04.1_amd64.deb (--unpack):
 cannot copy extracted data for './boot/vmlinuz-3.16.0-52-generic' to '/boot/vmlinuz-3.16.0-52-generic.dpkg-new': failed to write (No space left on device)
No apport report written because the error message indicates a disk full error
                                                                              dpkg-deb: error: subprocess paste was killed by signal (Broken pipe)
Examining /etc/kernel/postrm.d .
run-parts: executing /etc/kernel/postrm.d/initramfs-tools 3.16.0-52-generic /boot/vmlinuz-3.16.0-52-generic
run-parts: executing /etc/kernel/postrm.d/zz-update-grub 3.16.0-52-generic /boot/vmlinuz-3.16.0-52-generic
Errors were encountered while processing:
 /var/cache/apt/archives/linux-image-3.16.0-57-generic_3.16.0-57.77~14.04.1_amd64.deb
 /var/cache/apt/archives/linux-image-3.16.0-52-generic_3.16.0-52.71~14.04.1_amd64.deb
E: Sub-process /usr/bin/dpkg returned an error code (1)

我的启动分区几乎已满(98.7%),并且其中有相当多的图像,但我无法删除它们,因为我收到了相同的消息。

~$ ls /boot
abi-3.16.0-30-generic         initrd.img-3.16.0-46-generic
abi-3.16.0-41-generic         lost+found
abi-3.16.0-43-generic         memtest86+.bin
abi-3.16.0-45-generic         memtest86+.elf
abi-3.16.0-46-generic         memtest86+_multiboot.bin
abi-3.16.0-48-generic         System.map-3.16.0-30-generic
abi-3.16.0-49-generic         System.map-3.16.0-41-generic
abi-3.16.0-51-generic         System.map-3.16.0-43-generic
config-3.16.0-30-generic      System.map-3.16.0-45-generic
config-3.16.0-41-generic      System.map-3.16.0-46-generic
config-3.16.0-43-generic      System.map-3.16.0-48-generic
config-3.16.0-45-generic      System.map-3.16.0-49-generic
config-3.16.0-46-generic      System.map-3.16.0-51-generic
config-3.16.0-48-generic      vmlinuz-3.16.0-30-generic
config-3.16.0-49-generic      vmlinuz-3.16.0-41-generic
config-3.16.0-51-generic      vmlinuz-3.16.0-43-generic
grub                          vmlinuz-3.16.0-45-generic
initrd.img-3.16.0-30-generic  vmlinuz-3.16.0-46-generic
initrd.img-3.16.0-41-generic  vmlinuz-3.16.0-48-generic
initrd.img-3.16.0-43-generic  vmlinuz-3.16.0-49-generic
initrd.img-3.16.0-45-generic  vmlinuz-3.16.0-51-generic

答案1

当使用单独的启动分区时,经过多次升级后,您将必须删除旧的内核映像。

尝试:

sudo apt-get remove clang
sudo apt-get autoremove
sudo apt-get remove linux-image-3.16.0-30-generic linux-image-3.16.0-41-generic linux-image-3.16.0-43-generic linux-image-3.16.0-45-generic linux-image-3.16.0-46-generic linux-3.16.0-48-generic
sudo apt-get -f install
sudo apt-get install clang

或者,您可以删除启动分区上的一些旧文件,但在修复之前您会看到一些错误。

例如:

sudo rm -f /boot/*-3.16.0-30-*  /boot/*-3.16.0-41-* /boot/*-3.16.0-43-* /boot/*-3.16.0-45-* /boot/*-3.16.0-46-* /boot/*-3.16.0-48-*
sudo apt-get -f install
sudo apt-get remove linux-image-3.16.0-30-generic linux-image-3.16.0-41-generic linux-image-3.16.0-43-generic linux-image-3.16.0-45-generic linux-image-3.16.0-46-generic linux-3.16.0-48-generic
sudo apt-get -f install
sudo apt-get autoremove
sudo apt-get install clang

祝你好运。

相关内容