Ubuntu18.04安装软件时报/boot 空间不足gzip: stdout: No space left on device

在安装比特币所需要的依赖包时报下面错误

Setting up initramfs-tools (0.130ubuntu3.1) ...
update-initramfs: deferring update (trigger activated)
Processing triggers for initramfs-tools (0.130ubuntu3.1) ...
update-initramfs: Generating /boot/initrd.img-4.15.0-38-generic
I: The initramfs will attempt to resume from /dev/vda3
I: (UUID=118f04c0-d765-11e8-8f09-525400c4d1c8)
I: Set the RESUME variable to override this.

gzip: stdout: No space left on device
E: mkinitramfs failure cpio 141 gzip 1
update-initramfs: failed for /boot/initrd.img-4.15.0-38-generic with 1.
dpkg: error processing package initramfs-tools (--configure):
 installed initramfs-tools package post-installation script subprocess returned error exit status 1
Errors were encountered while processing:
 initramfs-tools
E: Sub-process /usr/bin/dpkg returned an error code (1)

参考了网上的教程,按下述步骤操作:
1.先查看已安装的内核版本

root@local:~/BlockChain# dpkg --get-selections |grep linux
binutils-x86-64-linux-gnu			install
console-setup-linux				install
libselinux1:amd64				install
linux-base					install
linux-firmware					install
linux-generic					install
linux-headers-4.15.0-29				install
linux-headers-4.15.0-29-generic			install
linux-headers-4.15.0-38				install
linux-headers-4.15.0-38-generic			install
linux-headers-generic				install
linux-image-4.15.0-29-generic			install
linux-image-4.15.0-38-generic			install
linux-image-generic				install
linux-libc-dev:amd64				install
linux-modules-4.15.0-29-generic			install
linux-modules-4.15.0-38-generic			install
linux-modules-extra-4.15.0-29-generic		install
linux-modules-extra-4.15.0-38-generic		install
linux-signed-generic				install
util-linux					install

可以看到安装了两个版本的内核:4.15.0-29-generic 和 4.15.0-38-generic

2.查看当前系统的内核版本

root@local:~/BlockChain# uname -a
Linux local 4.15.0-38-generic #41-Ubuntu SMP Wed Oct 10 10:59:38 UTC 2018 x86_64 x86_64 x86_64 GNU/Linux

可以看到当前系统的内核版本是4.15.0-38-generic

3.所以需要卸载掉4.15.0-29-generic这个不需要的旧内核

root@local:~/BlockChain# sudo apt-get remove linux-image-4.15.0-29-generic

4.卸载完成后,再次查看安装的内核版本

root@local:~/BlockChain# dpkg --get-selections |grep linux
binutils-x86-64-linux-gnu			install
console-setup-linux				install
libselinux1:amd64				install
linux-base					install
linux-firmware					install
linux-generic					install
linux-headers-4.15.0-29				install
linux-headers-4.15.0-29-generic			install
linux-headers-4.15.0-38				install
linux-headers-4.15.0-38-generic			install
linux-headers-generic				install
linux-image-4.15.0-29-generic			deinstall
linux-image-4.15.0-38-generic			install
linux-image-generic				install
linux-libc-dev:amd64				install
linux-modules-4.15.0-29-generic			install
linux-modules-4.15.0-38-generic			install
linux-modules-extra-4.15.0-29-generic		deinstall
linux-modules-extra-4.15.0-38-generic		install
linux-signed-generic				install
util-linux					install

可以看到,linux-image-4.15.0-29-generic和linux-modules-extra-4.15.0-29-generic处于deinstall状态,已经被卸载了。

5.再次安装需要的软件时不会报错了

参考:
ubuntu16.04 boot空间不足 no space left on device

  • 3
    点赞
  • 5
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值