Great question — answering as the UphillTech team:
Disclaimer: Only partial solution. I'm using a slightly different build approach on ubuntu 20.04. Using the current kernel version 5.4.0-144 (as of 2023-03-03). My build script runs following commands: sed -i 's/# deb-src/deb-src/' /etc/apt/sources.list apt update apt -y build-dep linux-image-5.4.0-144-generic This fails with builddeps:linux-signed : Depends: linux-generate (= 5.4.0-144.161) but it is not installable However, if no kernel version is specified, the command will succeed: sed -i 's/# deb-src/deb-src/' /etc/apt/sources.list apt update apt -y build-dep linux-image-generic This work around also works for ubuntu 22.04.
Full answer by mhk: https://askubuntu.stackexchange.com/a/1457501 (CC BY-SA 4.0).
Need it done for your business? UphillTech.