0

Ubuntu is having trouble finding generic linux headers for 4.10.0-28. What can I do to resolve this?

screenshot

Output of cat /etc/apt/sources.list

remus@linux:/var/log$ cat /etc/apt/sources.list
# deb cdrom:[Ubuntu 16.04.3 LTS _Xenial Xerus_ - Release amd64 (20170801)]/ xenial main restricted

# See http://help.ubuntu.com/community/UpgradeNotes for how to upgrade to
# newer versions of the distribution.
deb http://us.archive.ubuntu.com/ubuntu/ bionic main restricted
# deb-src http://us.archive.ubuntu.com/ubuntu/ xenial main restricted

## Major bug fix updates produced after the final release of the
## distribution.
deb http://us.archive.ubuntu.com/ubuntu/ bionic-updates main restricted
# deb-src http://us.archive.ubuntu.com/ubuntu/ xenial-updates main restricted

## N.B. software from this repository is ENTIRELY UNSUPPORTED by the Ubuntu
## team. Also, please note that software in universe WILL NOT receive any
## review or updates from the Ubuntu security team.
deb http://us.archive.ubuntu.com/ubuntu/ bionic universe
# deb-src http://us.archive.ubuntu.com/ubuntu/ xenial universe
deb http://us.archive.ubuntu.com/ubuntu/ bionic-updates universe
# deb-src http://us.archive.ubuntu.com/ubuntu/ xenial-updates universe

## N.B. software from this repository is ENTIRELY UNSUPPORTED by the Ubuntu 
## team, and may not be under a free licence. Please satisfy yourself as to 
## your rights to use the software. Also, please note that software in 
## multiverse WILL NOT receive any review or updates from the Ubuntu
## security team.
deb http://us.archive.ubuntu.com/ubuntu/ bionic multiverse
# deb-src http://us.archive.ubuntu.com/ubuntu/ xenial multiverse
deb http://us.archive.ubuntu.com/ubuntu/ bionic-updates multiverse
# deb-src http://us.archive.ubuntu.com/ubuntu/ xenial-updates multiverse

## N.B. software from this repository may not have been tested as
## extensively as that contained in the main release, although it includes
## newer versions of some applications which may provide useful features.
## Also, please note that software in backports WILL NOT receive any review
## or updates from the Ubuntu security team.
deb http://us.archive.ubuntu.com/ubuntu/ bionic-backports main restricted universe multiverse
# deb-src http://us.archive.ubuntu.com/ubuntu/ xenial-backports main restricted universe multiverse

## Uncomment the following two lines to add software from Canonical's
## 'partner' repository.
## This software is not part of Ubuntu, but is offered by Canonical and the
## respective vendors as a service to Ubuntu users.
# deb http://archive.canonical.com/ubuntu xenial partner
# deb-src http://archive.canonical.com/ubuntu xenial partner

deb http://security.ubuntu.com/ubuntu bionic-security main restricted
# deb-src http://security.ubuntu.com/ubuntu xenial-security main restricted
deb http://security.ubuntu.com/ubuntu bionic-security universe
# deb-src http://security.ubuntu.com/ubuntu xenial-security universe
deb http://security.ubuntu.com/ubuntu bionic-security multiverse
# deb-src http://security.ubuntu.com/ubuntu xenial-security multiverse
Neuron
  • 107
  • 4
David Corbin
  • 103
  • 4
  • I'll highly suggest you to kindly replace screenshot with text with code formatting. It will only take up a while and will benefit future readers too. Thanks :) – Kulfy Jan 03 '19 at 18:40
  • Please don't post text as a screenshot. search engines (including the stack exchange ones) can't index it, we can't copy it, blind people can't have it screen read to them. Text should be represented as text ;) – Neuron May 17 '21 at 18:53

2 Answers2

1

The current kernel version for your system is 4.10.0-28 which was shipped with 17.04 Zesty while 18.04 Bionic is shipped with 4.15.xxx... That's the reason why you're getting this error. Try installing newer kernel such as 4-15.0-43 (as of now this is the current kernel in my main installation). First of all determine which kernel you install from repository. For this run:

sudo apt update
apt-cache search linux-headers

And install that using:

sudo apt install linux-headers-4-15.0-43

You can replace 4-15.0-43 with any of the version available.

To know which Ubuntu version has which kernel version, see @Rinzwind's answer on List of Ubuntu Versions with Corresponding Linux Kernel Version

Kulfy
  • 17,416
  • 26
  • 64
  • 103
1

The better way would be install both standard kernel image, its headers and all necessary tools with:

sudo apt install linux-image-generic linux-headers-generic linux-tools-generic

then reboot and use them.
Such method will install all needed dependencies and make your system more secure by using supported kernel version.

N0rbert
  • 97,162
  • 34
  • 239
  • 423