Trying to reinstall Wireguard but fails


I am trying to reinstall wireguard but it fails see below:

[FAILED] DietPi-Software | dpkg-reconfigure -f noninteractive wireguard-dkms


  • Date | Thu Jan 7 20:30:54 GMT 2021
  • DietPi version | v6.34.3 (MichaIng/master)
  • Image creator | DietPi Core Team
  • Pre-image | Raspberry Pi OS (32-bit) Lite
  • Hardware | RPi 4 Model B (aarch64) (ID=4)
  • Kernel version | Linux RaspberryPi-4-Model-B 5.4.83-v8+ #1379 SMP PREEMPT Mon Dec 14 13:15:14 GMT 2020 aarch64 GNU/Linux
  • Distro | buster (ID=5,RASPBIAN=1)
  • Command | dpkg-reconfigure -f noninteractive wireguard-dkms
  • Exit code | 10
  • Software title | DietPi-Software

Steps to reproduce:

  1. …dietpi-software reinstall 172

Expected behaviour:

  • …I would have thought that wireguard should reinstall and then run?

Actual behaviour:

  • …Wireguard fails to reinstall.

Extra details:

  • …Seems like this command is what fails: dpkg-reconfigure -f noninteractive wireguard-dkms

Additional logs:

Deleting module version: 1.0.20201221
completely from the DKMS tree.
Loading new wireguard-1.0.20201221 DKMS files...
It is likely that 5.4.83-v8+ belongs to a chroot's host
Building for 5.4.83+, 5.4.83-v7+, 5.4.83-v7l+ and 5.4.83-v8+
Building initial module for 5.4.83+
Error! Bad return status for module build on kernel: 5.4.83+ (aarch64)
Consult /var/lib/dkms/wireguard/1.0.20201221/build/make.log for more information.

[FAILED] DietPi-Software | Unable to continue, DietPi-Software will now terminate.

Thanks for any help that you can provide to fix this issue.


You are running a mixture of 32bit image with a 64bit kernel mode, which is not a good idea. If you like to run on 64bit, go for the native 64bit Image which contains Raspberry OS 64bit BETA. But this will not solve the issue with Wireguard. At the moment, Raspberry OS is not delivering kernel headers that are needed to bild Wireguard modules. There is a huge discussion on Raspberry OS GitHub about it

Basically you can wait on official solution from Raspberry Foundation to have all features on the 64bit OS or use stable 32bit.

Hi Joulinar,

Thank you for the help. :slight_smile:

I have gone back to using the 32bit kernel for now as not being able to use wireguard is not an option for me.


This is now solved, I hope the Raspberry Foundation have wireguard working on a 64bit kernel soon.

just wait for Raspberry OS 64bit being released as stable or the upcoming next LTS kernel 5.10

However there is no real need for running a 64bit OS except you have specific software requiring it.