Unable to locate package linux
Solution 1
The original command should not be,
apt-get install -y --force-yes grub-pc linux
It should be,
apt-get install -y --force-yes grub-pc
If you run apt-get install -y --force-yes grub-pc linux
command, apt-get
tries to find and install the packages grub-pc
and linux
. But there is no such linux
package available.
E: Unable to locate package linux
The above part from the error report is your clue.
The presence of "linux" in the install line is a bug in boot-repair, and should be reported there.
Solution 2
The command line reported by boot-repair is
apt-get install -y --force-yes grub-pc linux
Whether or not the word "linux" should be there is a different question.
Related videos on Youtube
user271668
Updated on September 18, 2022Comments
-
user271668 over 1 year
Started boot-repair on live-usb, removed grub, and then was instructed to write in terminal
sudo chroot "/mnt/boot-sav/sda5" apt-get install -y --force-yes grub-pc linux
but I get:Reading package lists... Done Building dependency tree Reading state information... Done E: Unable to locate package linux
and it says grub is still absent.
-
muru over 9 yearspossible duplicate of Boot-repair can't complete a repair under Ubuntu Gnome 14.04
-
-
user271668 about 10 yearsI do write it on one line, it appears broken because it is the end of the line (I copy paste actually)
-
Haider Ali Wajihi over 9 yearsthnx alot, it was too confusing for beginners like me. your answer did great help.