问题描述
dpkg --configure -a
Setting up linux-image-3.13.0-35-generic (3.13.0-35.62) ...
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-35-generic
vmlinuz(/boot/vmlinuz-3.13.0-35-generic
) points to /boot/vmlinuz-3.13.0-35-generic
(/boot/vmlinuz-3.13.0-35-generic) -- doing nothing at /var/lib/dpkg/info/linux-image-3.13.0-35-generic.postinst line 491.
Examining /etc/kernel/postinst.d.
run-parts: executing /etc/kernel/postinst.d/apt-auto-removal 3.13.0-35-generic /boot/vmlinuz-3.13.0-35-generic
run-parts: executing /etc/kernel/postinst.d/initramfs-tools 3.13.0-35-generic /boot/vmlinuz-3.13.0-35-generic
update-initramfs: Generating /boot/initrd.img-3.13.0-35-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-35-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-35-generic.postinst line 1025.
dpkg: error processing package linux-image-3.13.0-35-generic (--configure):
subprocess installed post-installation script returned error exit status 2
dpkg: dependency problems prevent configuration of linux-image-extra-3.13.0-35-generic:
linux-image-extra-3.13.0-35-generic depends on linux-image-3.13.0-35-generic; however:
Package linux-image-3.13.0-35-generic is not configured yet.
dpkg: error processing package linux-image-extra-3.13.0-35-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-35-generic; however:
Package linux-image-3.13.0-35-generic is not configured yet.
linux-image-generic depends on linux-image-extra-3.13.0-35-generic; however:
Package linux-image-extra-3.13.0-35-generic is not configured yet.
dpkg: error processing package linux-image-generic (--configure):
dependency problems - leaving unconfigured
Errors were encountered while processing:
linux-image-3.13.0-35-generic
linux-image-extra-3.13.0-35-generic
linux-image-generic
最佳解决办法
我刚才有这个问题。我做的是在我的情况下使用dpkg
清除错误的包然后更新并强制重新安装:
sudo dpkg --purge linux-image-3.13.0-35-generic
sudo apt-get update
sudo apt-get -f install
安装过程可能需要更长的时间,但最终有效。
次佳解决办法
你的问题是:
update-initramfs: Generating /boot/initrd.img-3.16.0-43-generic
gzip: stdout: No space left on device
E: mkinitramfs failure cpio 141 gzip 1
解:
apt-get autoremove
第三种解决办法
对我来说,解决方案是不同的。
我使用命令sudo aptitude
,当出现图形菜单时,我使用/
获取pop-up搜索字段并查找所有linux-header, linux-image, linux-server
版本并删除除-
当前未使用的版本以外的所有版本。
为了找到当前的内核版本,我使用了uname -r
。
最后,我按照指定的顺序安装了较新版本的linux-{header, image, server}
,方法是选择它们并按+
。
为了确认更新,我使用了u
。
最后我重新启动,一切都修好了。