6

I ran updates and upgrades today and couldn't get WireGuard up:

$ sudo wg-quick up wg0
[#] ip link add wg0 type wireguard
Error: Unknown device type.
Unable to access interface: Protocol not supported

Purging and reinstalling WireGuard results in:

Setting up wireguard-dkms (1.0.20200429-2~18.04) ...
Loading new wireguard-1.0.20200429 DKMS files...
Building for 5.3.0-53-generic
Building initial module for 5.3.0-53-generic
ERROR: Cannot create report: [Errno 17] File exists: '/var/crash/wireguard-dkms.0.crash'
Error! Bad return status for module build on kernel: 5.3.0-53-generic (x86_64)
Consult /var/lib/dkms/wireguard/1.0.20200429/build/make.log for more information.
Setting up wireguard-tools (1.0.20200513-1~18.04) ...
wg-quick.target is a disabled or a static unit, not starting it.
Setting up wireguard (1.0.20200513-1~18.04) ...
Processing triggers for man-db (2.8.3-2ubuntu0.1) ...
ProblemType: Package
DKMSBuildLog:
 DKMS make.log for wireguard-1.0.20200429 for kernel 5.3.0-53-generic (x86_64)
 Wed May 20 09:54:57 PDT 2020
 make: Entering directory '/usr/src/linux-headers-5.3.0-53-generic'
   CC [M]  /var/lib/dkms/wireguard/1.0.20200429/build/main.o
   CC [M]  /var/lib/dkms/wireguard/1.0.20200429/build/noise.o
   CC [M]  /var/lib/dkms/wireguard/1.0.20200429/build/device.o
   CC [M]  /var/lib/dkms/wireguard/1.0.20200429/build/peer.o
   CC [M]  /var/lib/dkms/wireguard/1.0.20200429/build/timers.o
   CC [M]  /var/lib/dkms/wireguard/1.0.20200429/build/queueing.o
   CC [M]  /var/lib/dkms/wireguard/1.0.20200429/build/receive.o
   CC [M]  /var/lib/dkms/wireguard/1.0.20200429/build/send.o
 In file included from <command-line>:0:0:
 /var/lib/dkms/wireguard/1.0.20200429/build/compat/compat.h:1024:20: error: redefinition of ‘skb_reset_redirect’
  static inline void skb_reset_redirect(struct sk_buff *skb)
                     ^~~~~~~~~~~~~~~~~~
 In file included from /var/lib/dkms/wireguard/1.0.20200429/build/compat/compat.h:870:0,
                  from <command-line>:0:
 ./include/linux/skbuff.h:4476:20: note: previous definition of ‘skb_reset_redirect’ was here
  static inline void skb_reset_redirect(struct sk_buff *skb)
                     ^~~~~~~~~~~~~~~~~~
 In file included from <command-line>:0:0:
 /var/lib/dkms/wireguard/1.0.20200429/build/compat/compat.h:1024:20: error: redefinition of ‘skb_reset_redirect’
  static inline void skb_reset_redirect(struct sk_buff *skb)

Originally, I installed it with ppa:wireguard/wireguard - is the install different now with this kernel?

4
  • 1
    All my VPN networks where down due to this. For the moment, I have removed the 5.3.0-53 kernel and rollbacked all the computers to the 5.3.0-51 version.All people using Wireguard will be stuck with this. May 20, 2020 at 17:42
  • I don't know when, but "WireGuard will be backported to Ubuntu 18.04 LTS" (source).
    – bitinerant
    May 20, 2020 at 18:18
  • I have the same issue with a new Ubuntu 18.04 install using 4.15.0-102 May 22, 2020 at 10:08
  • I installed and booted 4.15.0-96 and that worked May 22, 2020 at 10:52

3 Answers 3

3

Since, wireguard-dkms has been updated. The version 1.0.20200506-1~18.04 fix this problem. Now, it works with kernel 5.3.0-53, but it did not work anymore with the 5.3-051 version...

2

I had the same issue with the kernel version 4.4.0-184-generic. Reinstalling the wireguard-dkms package worked for me:

$ sudo apt-get --reinstall install wireguard-dkms 
Reading package lists... Done
Building dependency tree       
Reading state information... Done
0 upgraded, 0 newly installed, 1 reinstalled, 0 to remove and 1 not upgraded.
Need to get 0 B/257 kB of archives.
After this operation, 0 B of additional disk space will be used.
(Reading database ... 293587 files and directories currently installed.)
Preparing to unpack .../wireguard-dkms_1.0.20200611-0ppa1~16.04_all.deb ...

------------------------------
Deleting module version: 1.0.20200611
completely from the DKMS tree.
------------------------------
Done.
Unpacking wireguard-dkms (1.0.20200611-0ppa1~16.04) over (1.0.20200611-0ppa1~16.04) ...
Setting up wireguard-dkms (1.0.20200611-0ppa1~16.04) ...
Loading new wireguard-1.0.20200611 DKMS files...
Building only for 4.4.0-184-generic
Building initial module for 4.4.0-184-generic
Done.

wireguard:
Running module version sanity check.
 - Original module
   - No original module exists within this kernel
 - Installation
   - Installing to /lib/modules/4.4.0-184-generic/kernel/net/

depmod....

DKMS: install completed.
 ~ $
1

Encountered the same issue with 5.3.0-1020-azure. For those who are unable to upgrade/downgrade their kernel (e.g. a hosted CI runner such as in GitHub Actions), installing some older version worked:

sudo apt install dkms

curl -L -o wireguard-tools.deb https://launchpad.net/~wireguard/+archive/ubuntu/wireguard/+build/19291633/+files/wireguard-tools_1.0.20200510-1~18.04_amd64.deb
curl -L -o wireguard-dkms.deb https://launchpad.net/~wireguard/+archive/ubuntu/wireguard/+build/19258545/+files/wireguard-dkms_1.0.20200429-2~18.04_all.deb

sudo dpkg -i wireguard-tools.deb
sudo dpkg -i wireguard-dkms.deb

sudo modprobe wireguard
0

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .