A few days ago, I have updated my Raspberry PI 3 model B device from Stretch to Buster. Previously I installed and configured successfully PiVPN with WireGuard, so it has been working before the update. So I started to debug what happened.

pivpn -d said:

::::        Self check       ::::
:: [OK] IP forwarding is enabled
:: [OK] Iptables MASQUERADE rule set
:: [ERR] WireGuard is not running, try to start now? [Y/n] y
Job for [email protected] failed because the control process exited with error code.
See "systemctl status [email protected]" and "journalctl -xe" for details.
:: [OK] WireGuard is enabled (it will automatically start on reboot)
:: [ERR] WireGuard is not listening, try to restart now? [Y/n] y
Job for [email protected] failed because the control process exited with error code.
See "systemctl status [email protected]" and "journalctl -xe" for details.

So, I tried to restart WireGuard, but nothing happened...

systemctl status [email protected] said:

[email protected] - WireGuard via wg-quick(8) for wg0
   Loaded: loaded (/lib/systemd/system/[email protected]; enabled; vendor preset: enabled)
   Active: failed (Result: exit-code) since Tue 2020-04-21 23:15:42 CEST; 4min 28s ago
     Docs: man:wg-quick(8)
  Process: 3881 ExecStart=/usr/bin/wg-quick up wg0 (code=exited, status=1/FAILURE)
 Main PID: 3881 (code=exited, status=1/FAILURE)

ápr 21 23:15:41 raspberrypi systemd[1]: Starting WireGuard via wg-quick(8) for wg0...
ápr 21 23:15:41 raspberrypi wg-quick[3881]: [#] ip link add wg0 type wireguard
ápr 21 23:15:42 raspberrypi wg-quick[3881]: RTNETLINK answers: Operation not supported
ápr 21 23:15:42 raspberrypi wg-quick[3881]: Unable to access interface: Protocol not supported
ápr 21 23:15:42 raspberrypi wg-quick[3881]: [#] ip link delete dev wg0
ápr 21 23:15:42 raspberrypi wg-quick[3881]: Cannot find device "wg0"
ápr 21 23:15:42 raspberrypi systemd[1]: [email protected]: Main process exited, code=exited, status=1/FAILURE
ápr 21 23:15:42 raspberrypi systemd[1]: [email protected]: Failed with result 'exit-code'.
ápr 21 23:15:42 raspberrypi systemd[1]: Failed to start WireGuard via wg-quick(8) for wg0.

Maybe something happened during loading WireGuard kernel files, so I tried this sudo modprobe wireguard command and I got this:

modprobe: ERROR: could not insert 'wireguard': Unknown symbol in module, or unknown parameter (see dmesg)

What should I do?

Where can I start the investigating?

Thank you for your reply in advance.

  • try uninstalling then re-installing wireguard Apr 21, 2020 at 22:43
  • "I have updated my Raspberry PI 3 model B device from Stretch to Buster" - there is NO supported upgrade - do a fresh install.
    – Milliways
    Apr 21, 2020 at 23:05
  • Did you check dmesg as the error message suggests? Apr 22, 2020 at 9:15
  • @JaromandaX: I have already done it. The result is the same.
    – olhptr
    Apr 24, 2020 at 17:01
  • @Milliways: Ok, I understand it, but it is possible. And everything is working, except PiVPN/WireGuard... I have done the upgrade based on this tutorial.
    – olhptr
    Apr 24, 2020 at 17:03

2 Answers 2


As official noted by the Raspberry Pi Foundation at Updating and upgrading Raspbian there is no support given for an upgrade from Jessie to Stretch. This should also be true for an upgrade from Stretch to Buster:

Upgrading an existing Jessie image is possible, but is not guaranteed to work in every circumstance. If you wish to try upgrading a Jessie image to Stretch, we strongly recommend making a backup first — we can accept no responsibility for loss of data from a failed update.

The safest way to solve your problem is to start over again with a fresh flashed Raspbian Buster image. As @JaromandaX commented you can also try to deinstall PiVPN (and wireguard?) and install it again in the hope it will find the new Buster environment and fit better to it.

  • Thank you, for your answer. Ok, I understand it, but I gave it a try, because I have a lot of configured things, e.g.: torrent, smb, network settings, domoticz, dlna, etc. I have already uninstall and reinstall PiVPN with WireGuard but the result is the same... Fortunately I have a full raw backup about my PI, if necessary, I can restore the full system.
    – olhptr
    Apr 24, 2020 at 17:08
  • @olhptr It is always a weighing up. How much effort you already have taken? How much support you may get? I`m afraid there isn't much. Are you sure wireguard is the only application that fails? The others are already running without problems? Are they really up to date with all new features and bug fixes? Maybe it is less effort to start over again with the certainty to be up to date.
    – Ingo
    Apr 24, 2020 at 17:44
  • Okay, I understood it. Currently I can not do a fresh buster install on RPI3. But I can restore the previos kernel version, based on this thread.
    – olhptr
    Apr 27, 2020 at 21:12

I got this same error message after running rpi-update instead of managing the kernel updates with apt. rpi-update offers a newer kernel than what apt can offer headers for, so you wind up with kernel headers that don't match your kernel version... and don't have the Wireguard interface type available. This is probably the same conflict you got when you did the upgrade.

Recently (apparently), the foundation has started providing headers for their advanced kernel. According to the online documentation:

If you are compiling a kernel module or similar, you will need the Linux Kernel headers. These provide the various function and structure definitions required when compiling code that interfaces with the kernel.

sudo apt install raspberrypi-kernel-headers

Note that it can take quite a while for this command to complete, as it installs a lot of small files. There is no progress indicator.

Installing that and rebooting helped me when I had the same error message, and it might work in OP's case too.

  • Hi @Keith, thank you for your post. If I remember well, I tried your suggestion and it did not solve my problem.
    – olhptr
    Jul 28, 2020 at 13:11

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.