I was trying to install perf by sudo apt-get install linux-tools-common linux-tools-generic linux-tools-`uname -r` , but this gives me an error saying

E: Unable to locate package linux-tools-5.4.0-120-generic
E: Couldn't find any package by glob 'linux-tools-5.4.0-120-generic'
E: Couldn't find any package by regex 'linux-tools-5.4.0-120-generic'

After some amount of digging I found that my kernel version is 5.4.0-120-generic but my linux-tools is of version 4.15.0. How can I get around this problem?

New contributor
Ade Wei is a new contributor to this site. Take care in asking for clarification, commenting, and answering. Check out our Code of Conduct.
  • You've provided no OS/release details; but both 4.15 & 5.4 are used by 18.04 or bionic so have you recently switched kernel stacks? but didn't clean up properly? Providing release details will clarify the situation (and give alternative potential issues) as without that detail we can only guess.
    – guiverc
    Jun 23 at 23:12
  • @guiverc thanks for your comment. I'm new to ubuntu server so sorry for not being clear. I've managed to downgrade 5.4 to 4.15 which solved the problem.
    – Ade Wei
    Jun 23 at 23:34
  • There was no need to downgrade.
    – Pilot6
    Jun 24 at 10:21

1 Answer 1


You are using a HWE kernel, but installed linux-tools for a standard kernel.

You can install proper linux-tools by

sudo apt install linux-tools-generic-hwe-18.04 

Your Answer

Ade Wei is a new contributor. Be nice, and check out our Code of Conduct.

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.