在安装比特币所需要的依赖包时报下面错误
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.再次安装需要的软件时不会报错了