I am having an error when I was trying to install docker.
I have tried sudo apt-get autoremove
but it didn't help.
Here's the output:
sudo apt install docker.io
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following package was automatically installed and is no longer required:
linux-modules-4.15.0-29-generic
Use 'sudo apt autoremove' to remove it.
The following additional packages will be installed:
bridge-utils cgroupfs-mount containerd pigz runc ubuntu-fan
Suggested packages:
aufs-tools btrfs-tools debootstrap docker-doc rinse zfs-fuse | zfsutils
The following packages will be REMOVED:
linux-image-4.15.0-29-generic
The following NEW packages will be installed:
bridge-utils cgroupfs-mount containerd docker.io pigz runc ubuntu-fan
0 upgraded, 7 newly installed, 1 to remove and 433 not upgraded.
1 not fully installed or removed.
Need to get 0 B/52.2 MB of archives.
After this operation, 249 MB of additional disk space will be used.
Do you want to continue? [Y/n] y
Preconfiguring packages ...
(Reading database ... 280062 files and directories currently installed.)
Removing linux-image-4.15.0-29-generic (4.15.0-29.31~16.04.1) ...
/etc/kernel/postrm.d/initramfs-tools:
update-initramfs: Deleting /boot/initrd.img-4.15.0-29-generic
/etc/kernel/postrm.d/zz-update-grub:
Searching for GRUB installation directory ... found: /boot/grub
Searching for default file ... found: /boot/grub/default
Testing for an existing GRUB menu.lst file ...
Could not find /boot/grub/menu.lst file. Would you like /boot/grub/menu.lst generated for you? (y/N) /usr/sbin/update-grub: line 1094: read: read error: 0: Bad file descriptor
run-parts: /etc/kernel/postrm.d/zz-update-grub exited with return code 1
dpkg: error processing package linux-image-4.15.0-29-generic (--remove):
subprocess installed post-removal script returned error exit status 1
Errors were encountered while processing:
linux-image-4.15.0-29-generic
E: Sub-process /usr/bin/dpkg returned an error code (1)