Unable to install Wireguard on Ubuntu focal

I am trying to install wireguard on Ubuntu focal 20.04. I have not made any modifications to sources.list, however sudo apt install wireguard

The installation of kernel module, specifically, fails with the following error

Loading new wireguard-1.0.20201112 DKMS files...
Building for 4.4.194-17-rockchip-g07288d4ebac7
Building initial module for 4.4.194-17-rockchip-g07288d4ebac7
Error! Bad return status for module build on kernel: 4.4.194-17-rockchip-g07288d4ebac7 (aarch64)
Consult /var/lib/dkms/wireguard/1.0.20201112/build/make.log for more information.
dpkg: error processing package wireguard-dkms (--configure):
 installed wireguard-dkms package post-installation script subprocess returned error exit status 10
dpkg: dependency problems prevent configuration of wireguard:
 wireguard depends on wireguard-dkms (>= 0.0.20200121-2) | wireguard-modules (>= 0.0.20191219); however:
  Package wireguard-dkms is not configured yet.
  Package wireguard-modules is not installed.

dpkg: error processing package wireguard (--configure):
 dependency problems - leaving unconfigured
Processing triggers for libc-bin (2.31-0ubuntu9.2) ...
Errors were encountered while processing:
 wireguard-dkms
 wireguard

Try Armbian, WG works OOB.
https://www.armbian.com/rockpie/

Hello, aviartz
My workaround TIPS share to you.
First:

  • sudo apt-get install -y libssl-dev build-essential iptables

Second:

  • cd /usr/src/linux-headers-$(uname -r)
  • make scripts

Third:

  • sudo apt install wireguard

I try it in the newest ubuntu image successfully. Can you have a try?

This does not work unfortunately. Looking at other forum post, the kernel is not compatible. I have purchased several CM3’s recently hoping to use as a Pi CM4 drop in replacement, but a disappointing sofar… no support for wireguard, cannot acces the serial port, no ssd support… pretty useless :frowning: