Cant install , update or remove without getting this problem!
I have had this problem for about a week, i cant install , autoremove, or update without the problem showing up, since i tryed to update the kernel and it stays the same , i assume the problem comes from the kernel.
E: Sub-process /usr/bin/dpkg returned an error code (1)
Example of autoremove:
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following packages will be REMOVED:
linux-image-5.8.0-53-generic
0 upgraded, 0 newly installed, 1 to remove and 0 not upgraded.
6 not fully installed or removed.
After this operation, 9822 kB disk space will be freed.
Do you want to continue? [Y/n] y
(Reading database ... 372505 files and directories currently installed.)
Removing linux-image-5.8.0-53-generic (5.8.0-53.60~20.04.1) ...
/etc/kernel/postrm.d/initramfs-tools:
update-initramfs: Deleting /boot/initrd.img-5.8.0-53-generic
/etc/kernel/postrm.d/zz-update-grub:
Sourcing file `/etc/default/grub'
/usr/sbin/grub-mkconfig: 34: /etc/default/grub: Syntax error: EOF in backquote s
ubstitution
run-parts: /etc/kernel/postrm.d/zz-update-grub exited with return code 2
dpkg: error processing package linux-image-5.8.0-53-generic (--remove):
installed linux-image-5.8.0-53-generic package post-removal script subprocess r
eturned error exit status 1
dpkg: too many errors, stopping
Errors were encountered while processing:
linux-image-5.8.0-53-generic
Processing was halted because there were too many errors.
**E: Sub-process /usr/bin/dpkg returned an error code (1)**
The pertinent error message is /usr/sbin/grub-mkconfig: 34: /etc/default/grub: Syntax error: EOF in backquote
.
Find the bad line with
grep -n '`' /etc/default/grub
fix that.