Score:0

Cant install , update or remove without getting this problem!

sz flag

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)**
Score:3
it flag

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.

waltinator avatar
it flag
Please click the checkmark to "accept" my answer, if it helped you.
sz flag
Output : noblelip@noblepc:~$ grep -n '`' /etc/default/grub 9:GRUB_DISTRIBUTOR="`lsb_release -i -s 2> /dev/null || echo Debian`" 23:# you can see them in real GRUB with the command `vbeinfo' Know any solution?
waltinator avatar
it flag
Read `man sudoedit` and `sudoedit /etc/default/grub`. Goto line 9, and erase the "`" 23:`" characters. Erase any backtick ("`\`") at end-of line. Save the file.
waltinator avatar
it flag
Please [edit] your post to add new information, properly formatted. Information added via comments is hard for you to format, hard for us to read and ignored by future readers. Please click [edit] and add that vital information to your question so all the facts we need are in the question. Please don't use Add Comment, since that's our uplink to you. All facts about your system should go in the Question with [edit]
sz flag
I will when i resolve the problem
mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.