运行 apt-get upgrade 时出错

运行 apt-get upgrade 时出错

我在安装了 Trusty 服务器的机器上运行 apt-get upgrade。我似乎收到以下错误

asdf@pqrs:/⟫ sudo apt-get upgrade                               
Reading package lists... 
Done Building dependency tree        
Reading state information... 
Done Calculating upgrade...
Done 
The following packages were automatically installed and are no longer required:  
linux-headers-3.13.0-24 linux-headers-3.13.0-24-generic  
linux-headers-3.13.0-29 linux-headers-3.13.0-29-generic  
linux-headers-3.13.0-30 linux-headers-3.13.0-30-generic  
linux-headers-3.13.0-32 linux-headers-3.13.0-32-generic  
linux-headers-3.13.0-33 linux-headers-3.13.0-33-generic  
linux-image-3.13.0-24-generic linux-image-3.13.0-29-generic  
linux-image-3.13.0-30-generic linux-image-3.13.0-32-generic  
linux-image-3.13.0-33-generic linux-image-extra-3.13.0-24-generic  
linux-image-extra-3.13.0-29-generic
linux-image-extra-3.13.0-30-generic  
linux-image-extra-3.13.0-32-generic
linux-image-extra-3.13.0-33-generic Use 'apt-get autoremove' to remove
them. 0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded. 4
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 linux-image-3.13.0-36-generic (3.13.0-36.63) ... Running
depmod. update-initramfs: deferring update (hook will be called later)
The link /initrd.img is a dangling linkto
/boot/initrd.img-3.13.0-36-generic
vmlinuz(/boot/vmlinuz-3.13.0-36-generic ) points to
/boot/vmlinuz-3.13.0-36-generic  (/boot/vmlinuz-3.13.0-36-generic) --
doing nothing at
/var/lib/dpkg/info/linux-image-3.13.0-36-generic.postinst line 491.
Examining /etc/kernel/postinst.d. run-parts: executing
/etc/kernel/postinst.d/apt-auto-removal 3.13.0-36-generic
/boot/vmlinuz-3.13.0-36-generic run-parts: executing
/etc/kernel/postinst.d/initramfs-tools 3.13.0-36-generic
/boot/vmlinuz-3.13.0-36-generic update-initramfs: Generating
/boot/initrd.img-3.13.0-36-generic
gzip: stdout: No space left on device E: mkinitramfs failure cpio 141
gzip 1 update-initramfs: failed for /boot/initrd.img-3.13.0-36-generic
with 1. run-parts: /etc/kernel/postinst.d/initramfs-tools exited with
return code 1 Failed to process /etc/kernel/postinst.d at
/var/lib/dpkg/info/linux-image-3.13.0-36-generic.postinst line 1025.
dpkg: error processing package linux-image-3.13.0-36-generic
(--configure):  subprocess installed post-installation script returned
error exit status 2 dpkg: dependency problems prevent configuration of
linux-image-extra-3.13.0-36-generic: 
linux-image-extra-3.13.0-36-generic depends on
linux-image-3.13.0-36-generic; however:   Package
linux-image-3.13.0-36-generic is not configured yet.
dpkg: error processing package linux-image-extra-3.13.0-36-generic
(--configure):  dependency problems - leaving unconfigured dpkg:
dependency problems prevent configuration of linux-image-generic: 
linux-image-generic depends on linux-image-3.13.0-36-generic; however:
Package linux-image-3.13.0-36-generic is not configured yet. 
linux-image-generic depends on linux-image-extra-3.13.0-36-generic;
however:   Package linux-image-extra-3.13.0-36-generic is not
configured yet.
dpkg: error processing package linux-image-generic (--configure): 
dependency problems - leaving unconfigured dpkg: dependency problems
prevent configuration of linux-generic:  linux-generic depends on
linux-image-generic (= 3.13.0.36.43); however:   Package
linux-image-generic is not cNo apport report written because the error
message indicates its a followup error from a previous failure.
No apport report written because the error message indicates its a
followup error from a previous failure.
No apport report written because MaxReports is reached already
onfigured yet.
dpkg: error processing package linux-generic (--configure): 
dependency problems - leaving unconfigured Errors were encountered
while processing:  
linux-image-3.13.0-36-generic 
linux-image-extra-3.13.0-36-generic  
linux-image-generic 
linux-generic 
E: Sub-process /usr/bin/dpkg returned an error code (1)

似乎表明机器内存不足,但事实并非如此。我是不是漏掉了什么?

答案1

看来你的/boot空间不够了。只需卸载所有旧的 Linux 映像,正如 APT 已经告诉你的那样:

sudo apt-get autoremove

这应该会释放一些空间/boot。另一种方法是缩小另一个分区并扩展该boot分区。

相关内容