Unable to locate package linux

14,665

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.

Share:
14,665

Related videos on Youtube

user271668
Author by

user271668

Updated on September 18, 2022

Comments

  • user271668
    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.

  • user271668
    user271668 about 10 years
    I do write it on one line, it appears broken because it is the end of the line (I copy paste actually)
  • Haider Ali Wajihi
    Haider Ali Wajihi over 9 years
    thnx alot, it was too confusing for beginners like me. your answer did great help.