无法 apt-get 升级

无法 apt-get 升级

所以 apt-get 告诉我使用 -f install

guy@server:~$ 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:
  linux-headers-3.13.0-32 linux-headers-3.13.0-32-generic
  linux-headers-3.13.0-35 linux-headers-3.13.0-35-generic
  linux-headers-3.13.0-36 linux-headers-3.13.0-36-generic
  linux-headers-3.13.0-37 linux-headers-3.13.0-37-generic
  linux-headers-3.13.0-39 linux-headers-3.13.0-39-generic
  linux-headers-3.13.0-40 linux-headers-3.13.0-40-generic
  linux-headers-3.13.0-44 linux-headers-3.13.0-44-generic
  linux-headers-3.13.0-48 linux-headers-3.13.0-48-generic
  linux-headers-3.13.0-49 linux-headers-3.13.0-49-generic
  linux-image-3.13.0-32-generic linux-image-3.13.0-35-generic
  linux-image-3.13.0-36-generic linux-image-3.13.0-37-generic
  linux-image-3.13.0-39-generic linux-image-3.13.0-40-generic
  linux-image-3.13.0-44-generic linux-image-3.13.0-48-generic
  linux-image-3.13.0-49-generic linux-image-extra-3.13.0-32-generic
  linux-image-extra-3.13.0-35-generic linux-image-extra-3.13.0-36-generic
  linux-image-extra-3.13.0-37-generic linux-image-extra-3.13.0-39-generic
  linux-image-extra-3.13.0-40-generic linux-image-extra-3.13.0-44-generic
  linux-image-extra-3.13.0-48-generic linux-image-extra-3.13.0-49-generic
Use 'apt-get autoremove' to remove them.
The following extra packages will be installed:
  linux-image-3.13.0-48-generic linux-image-3.13.0-49-generic
  linux-image-3.13.0-57-generic
Suggested packages:
  fdutils linux-doc-3.13.0 linux-source-3.13.0 linux-tools
The following NEW packages will be installed:
  linux-image-3.13.0-48-generic linux-image-3.13.0-49-generic
  linux-image-3.13.0-57-generic
0 upgraded, 3 newly installed, 0 to remove and 77 not upgraded.
69 not fully installed or removed.
Need to get 0 B/45.4 MB of archives.
After this operation, 127 MB of additional disk space will be used.
Do you want to continue? [Y/n] Y
(Reading database ... 384965 files and directories currently installed.)
Preparing to unpack .../linux-image-3.13.0-57-generic_3.13.0-57.95_amd64.deb ...
Done.
Unpacking linux-image-3.13.0-57-generic (3.13.0-57.95) ...
dpkg: error processing archive /var/cache/apt/archives/linux-image-3.13.0-57-generic_3.13.0-57.95_amd64.deb (--unpack):
 cannot copy extracted data for './boot/System.map-3.13.0-57-generic' to '/boot/System.map-3.13.0-57-generic.dpkg-new': failed to write
No apport report written because the error message indicates a disk full error
                                                                              dpkg-deb: error: subprocess paste was killed by signal (Br
Examining /etc/kernel/postrm.d .
run-parts: executing /etc/kernel/postrm.d/initramfs-tools 3.13.0-57-generic /boot/vmlinuz-3.13.0-57-generic
run-parts: executing /etc/kernel/postrm.d/zz-update-grub 3.13.0-57-generic /boot/vmlinuz-3.13.0-57-generic
Preparing to unpack .../linux-image-3.13.0-48-generic_3.13.0-48.80_amd64.deb ...
Done.
Unpacking linux-image-3.13.0-48-generic (3.13.0-48.80) ...
dpkg: error processing archive /var/cache/apt/archives/linux-image-3.13.0-48-generic_3.13.0-48.80_amd64.deb (--unpack):
 cannot copy extracted data for './boot/vmlinuz-3.13.0-48-generic' to '/boot/vmlinuz-3.13.0-48-generic.dpkg-new': failed to write (No sp
No apport report written because the error message indicates a disk full error
                                                                              dpkg-deb: error: subprocess paste was killed by signal (Br
Examining /etc/kernel/postrm.d .
run-parts: executing /etc/kernel/postrm.d/initramfs-tools 3.13.0-48-generic /boot/vmlinuz-3.13.0-48-generic
run-parts: executing /etc/kernel/postrm.d/zz-update-grub 3.13.0-48-generic /boot/vmlinuz-3.13.0-48-generic
Preparing to unpack .../linux-image-3.13.0-49-generic_3.13.0-49.83_amd64.deb ...
Done.
Unpacking linux-image-3.13.0-49-generic (3.13.0-49.83) ...
dpkg: error processing archive /var/cache/apt/archives/linux-image-3.13.0-49-generic_3.13.0-49.83_amd64.deb (--unpack):
 cannot copy extracted data for './boot/vmlinuz-3.13.0-49-generic' to '/boot/vmlinuz-3.13.0-49-generic.dpkg-new': failed to write (No sp                                                          ace 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 (Br                                                          oken pipe)
Examining /etc/kernel/postrm.d .
run-parts: executing /etc/kernel/postrm.d/initramfs-tools 3.13.0-49-generic /boot/vmlinuz-3.13.0-49-generic
run-parts: executing /etc/kernel/postrm.d/zz-update-grub 3.13.0-49-generic /boot/vmlinuz-3.13.0-49-generic
Errors were encountered while processing:
 /var/cache/apt/archives/linux-image-3.13.0-57-generic_3.13.0-57.95_amd64.deb
 /var/cache/apt/archives/linux-image-3.13.0-48-generic_3.13.0-48.80_amd64.deb
 /var/cache/apt/archives/linux-image-3.13.0-49-generic_3.13.0-49.83_amd64.deb
E: Sub-process /usr/bin/dpkg returned an error code (1)

我该如何解决这个问题?我试过自动删除,但仍然不允许我更新或添加新软件。请帮忙!

答案1

the error message indicates a disk full error

这就是问题的根源。您需要先释放磁盘空间,然后才能执行其他操作。尝试释放至少 1 GB 的空间。

您的问题部分是由于积累了大量旧内核。每个内核可能占用 200-300 MB 的空间。

命令是:

sudo apt-get autoremove

单独尝试。不要同时尝试其他任何事情。

请注意以下两点:

  1. 您可能需要在执行自动删除之前释放一些磁盘空间。它可能需要一些可用的临时空间才能继续。
  2. 一次性去除那么多玉米粒需要很长时间。请确保您有足够的时间让它运行而无需中断它。

答案2

你是对的。/boot 分区已满 100%,但我无法自动删除,因为它仍然显示有未满足的依赖项。所以我将手动删除它们,然后我会再次发帖以找出我可以安全删除哪些。

相关内容