ubuntu下用apt-get install 安装软件时出现 initramfs-tools错误

来源:互联网 发布:淘宝定制商品是什么 编辑:程序博客网 时间:2024/05/25 13:33

错误提示:

 

gzip: stdout: No space left on device
E: mkinitramfs failure cpio 141 gzip 1
update-initramfs: failed for /boot/initrd.img-3.2.0-29-generic with 1.
dpkg:处理 initramfs-tools (–configure)时出错:
子进程 已安装 post-installation 脚本 返回了错误号 1
在处理时有错误发生:
initramfs-tools
E: Sub-process /usr/bin/dpkg returned an error code (1)

用df -h查看一下 空间的使用情况

 

解决这个问题就是删除多余的内核:

 

方法一:

打开终端:

sudo aptitude purge ~ilinux-image-.*\(\!`uname -r`\)

这条命令的作用:删除当前系统没有正在使用的所有内核,一般系统使用的都是最

新的内核版本(如果你没有自己设置的话)

这样你的GRUB启动菜单中只留下最新版本内核的菜单了

 

 

方法二:

查看全部内核的命令:

dpkg –get-selections|grep linux

 

查看当前使用内核的命令:

uname -r

 

删除多余的内核:

sudo apt-get remove linux-image-<版本号>

不要随便删除其他的内核,只删除前面是image的

 

出现卸载不完全时,用以下命令:

sudo apt-get autoremove

 

 

 

原创粉丝点击