Error installing LTTng for use as described in ArduPilot docs

Hi everyone,

I am trying to install LTTng v2.12 on my Ubuntu 22.04 machine so that I can use it as described on this docs page.

However, every time I try to install by following the steps on this page, I run into these errors when running the “sudo apt-get install lttng-modules-dkms” command:

cparkes@Ubuntu20:~$ sudo apt-get install lttng-modules-dkms
Reading package lists… Done
Building dependency tree
Reading state information… Done
The following additional packages will be installed:
dctrl-tools dkms
Suggested packages:
debtags menu
The following NEW packages will be installed:
dctrl-tools dkms lttng-modules-dkms
0 upgraded, 3 newly installed, 0 to remove and 146 not upgraded.
Need to get 413 kB of archives.
After this operation, 3,905 kB of additional disk space will be used.
Do you want to continue? [Y/n] y
Get:1 http:// us.archive.ubuntu. com/ubuntu focal/main amd64 dctrl-tools amd64 2.24-3 [61.5 kB]
Get:2 http:// us.archive.ubuntu. com/ubuntu focal-updates/main amd64 dkms all 2.8.1-5ubuntu2 [66.8 kB]
Get:3 http:// ppa.launchpad. net/lttng/stable-2.12/ubuntu focal/main amd64 lttng-modules-dkms all 2.12.6-1~ubuntu20.04.1 [285 kB]
Fetched 413 kB in 1s (560 kB/s)
Selecting previously unselected package dctrl-tools.
(Reading database … 184657 files and directories currently installed.)
Preparing to unpack …/dctrl-tools_2.24-3_amd64.deb …
Unpacking dctrl-tools (2.24-3) …
Selecting previously unselected package dkms.
Preparing to unpack …/dkms_2.8.1-5ubuntu2_all.deb …
Unpacking dkms (2.8.1-5ubuntu2) …
Selecting previously unselected package lttng-modules-dkms.
Preparing to unpack …/lttng-modules-dkms_2.12.6-1~ubuntu20.04.1_all.deb …
Unpacking lttng-modules-dkms (2.12.6-1~ubuntu20.04.1) …
Setting up dctrl-tools (2.24-3) …
Setting up dkms (2.8.1-5ubuntu2) …
Setting up lttng-modules-dkms (2.12.6-1~ubuntu20.04.1) …
Loading new lttng-modules-2.12.6 DKMS files…
Building for 5.15.0-73-generic
Building initial module for 5.15.0-73-generic
Error! Bad return status for module build on kernel: 5.15.0-73-generic (x86_64)
Consult /var/lib/dkms/lttng-modules/2.12.6/build/make.log for more information.
dpkg: error processing package lttng-modules-dkms (–configure):
installed lttng-modules-dkms package post-installation script subprocess returned error exit status 10
Processing triggers for man-db (2.9.1-1) …
Errors were encountered while processing:
lttng-modules-dkms
E: Sub-process /usr/bin/dpkg returned an error code (1)

I have tried reconfiguring the package database by running “sudo dpkg --configure -a” and rebuilding the kernel using the steps on this page, but neither fixed the issue.

Has anyone else faced this issue when attempting to install LTTng or have any ideas for what I could try next? Any help would be very appreciated.

Thanks!