flamegraph icon indicating copy to clipboard operation
flamegraph copied to clipboard

fails to run on linux with kernel 5.4

Open 0x8f701 opened this issue 4 years ago • 4 comments

WARNING: perf not found for kernel 5.4.23-050423

You may need to install the following packages for this specific kernel: linux-tools-5.4.23-050423-lowlatency linux-cloud-tools-5.4.23-050423-lowlatency

You may also want to install one of the following packages to keep up to date: linux-tools-lowlatency linux-cloud-tools-lowlatency failed to sample program

0x8f701 avatar Apr 13 '20 08:04 0x8f701

I am just a lurker without any affiliation to the project, but have experienced this problem before.

linux perf tools aren't present in package managers for all versions of the kernel, so you might have to install them from source.

In your case, you should try installing the pakcages suggested and try again. If that helps - feel free to close the ticket. I had a kernel version that didn't have linux-tools in the package manager and compiling from source made this problem go away.

petr-tik avatar Apr 19 '20 18:04 petr-tik

Hi, maybe this blog could help.

yueshangzuo avatar Nov 10 '20 06:11 yueshangzuo

I've had the same error. Building from source got my perf

Ubuntu 20.04 Linux mymachine 5.4.0-65-generic #73-Ubuntu SMP Mon Jan 18 17:25:17 UTC 2021 x86_64 x86_64 x86_64 GNU/Linux

RandomInsano avatar Feb 25 '21 07:02 RandomInsano

Try looking in the /bin directory for a different program with perf in it's name. Then, set the PERF environment variable to point to the path of that executable. You may want to confirm that printing the --help message actually works beforehand though.

This kind of worked for me, but now I have a different error that's very uninformative. Now my error is:

failed to sample program

Supermath101 avatar Apr 02 '21 01:04 Supermath101