Sharing: System prompt up error `sudo dpkg –configure -a`

:~$ sudo dpkg --configure -a
...
...
...
Error!  The  /var/lib/dkms/wireguard/1.0.20201112/5.10.0-1034-oem/x86_64/dkms.conf for module wireguard includes a BUILD_EXCLUSIVE directive which does not match this kernel/arch.  This indicates that it should not be built.
...done.

Hello englianhu
As it says in the error message, cannot be installed with your kernel that you’re running.
Try installing with a different kernel, preferably a LTS Kernel (Long Term Support.)

Try to upgrade the Kernel to be LST version when the system shows above error sudo dpkg --configure -a.

:~$ sudo add-apt-repository ppa:tuxinvader/lts-mainline -y
:~$ sudo apt update
:~$ sudo apt-get install linux-generic-5.15
:~$ reboot
:~$ sudo apt install neofetch -y
:~$ sudo uname -r
:~$ 
:~$ neofetch
            .-/+oossssoo+/-.               englianhu@Scibrokes-Trading 
        `:+ssssssssssssssssss+:`           --------------------------- 
      -+ssssssssssssssssssyyssss+-         OS: Ubuntu 20.04.3 LTS x86_64 
    .ossssssssssssssssssdMMMNysssso.       Host: 23-p080d 
   /ssssssssssshdmmNNmmyNMMMMhssssss/      Kernel: 5.15.7-051507-generic 
  +ssssssssshmydMMMMMMMNddddyssssssss+     Uptime: 6 mins 
 /sssssssshNMMMyhhyyyyhmNMMMNhssssssss/    Packages: 5931 (dpkg), 15 (flatpak), 35 (snap) 
.ssssssssdMMMNhsssssssssshNMMMdssssssss.   Shell: bash 5.0.17 
+sssshhhyNMMNyssssssssssssyNMMMysssssss+   Resolution: 1920x1080 
ossyNMMMNyMMhsssssssssssssshmmmhssssssso   DE: Plasma 
ossyNMMMNyMMhsssssssssssssshmmmhssssssso   WM: KWin 
+sssshhhyNMMNyssssssssssssyNMMMysssssss+   WM Theme: Infinity-Aurorae 
.ssssssssdMMMNhsssssssssshNMMMdssssssss.   Theme: Infinity Dark Color [Plasma], Breeze [GT 
 /sssssssshNMMMyhhyyyyhdNMMMNhssssssss/    Icons: Infinity-Dark-Icons [Plasma], Infinity-D 
  +sssssssssdmydMMMMMMMMddddyssssssss+     Terminal: konsole 
   /ssssssssssshdmNNNNmyNMMMMhssssss/      CPU: Intel i5-4590T (4) @ 3.000GHz 
    .ossssssssssssssssssdMMMNysssso.       GPU: NVIDIA GeForce 710M 
      -+sssssssssssssssssyyyssss+-         GPU: Intel HD Graphics 
        `:+ssssssssssssssssss+:`           Memory: 5178MiB / 15894MiB 
            .-/+oossssoo+/-.

Kernel 5.15 LTS is the latest LTS (long term support) version in year 2021, upgraded upon refer to below reference, enter BIOS mode to disable secure boot when the screen prompt invalid signature after step reboot.

Reference:


Source : System prompt up error sudo dpkg –configure -a