1

Trying to install linux headers for Ubuntu 2204 Desktop (uname -r = 5.13.0-40-generic) and I get:

sudo apt install linux-headers-$(uname -r)
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
Package linux-headers-5.13.0-40-generic is not available, but is referred to by another package.
This may mean that the package is missing, has been obsoleted, or
is only available from another source  
E: Package 'linux-headers-5.13.0-40-generic' has no installation candidate

What is the solution? Thanks.

  • Are you sure you're running 22.04? The kernel version should be 5.15 ... – matigo Apr 22 '22 at 12:00
  • Yep, downloaded ubuntu-22.04-desktop-amd64.iso, created usb, and did an update via sudo update-manager -d Please tell me if that is incorrect way to do it... lsb_release -a No LSB modules are available. Distributor ID: Ubuntu Description: Ubuntu 22.04 LTS Release: 22.04 Codename: jammy – hornetster Apr 22 '22 at 12:03

1 Answers1

2

You upgraded from an older release. Please try installing current kernel with ist headers by sudo apt install linux-generic. (It is probably already installed already.) Then reboot to start using that kernel.

jarno
  • 5,600
  • Well, now I'm confused. Yes, when I sudo apt install linux-generic I get "already installed", but when I try to install the headers, get "E: Package 'linux-headers-5.13.0-40-generic' has no installation candidate" – hornetster Apr 22 '22 at 12:14
  • Think I have it sussed... Am dual-booting with Tumbleweed, and hadn't updated grub. – hornetster Apr 22 '22 at 12:29