cannot [re]install Wireguard Topic is solved

Having issues with your DietPi installation or found a bug? Post it here.
Post Reply
AndrewZ
Posts: 22
Joined: Mon May 01, 2017 4:34 pm

cannot [re]install Wireguard

Post by AndrewZ »

For whatever reason I cannot [re]install wireguard, I suppose that happened after the kernel upgrade.
I see some errors below but not sure how to fix them, please advise.
BTW, is it possible to install a newer version of wireguard with this kernel?

Code: Select all

# apt install wireguard-dkms
Reading package lists... Done
Building dependency tree       
Reading state information... Done
The following additional packages will be installed:
  dkms
Suggested packages:
  python3-apport menu
Recommended packages:
  fakeroot linux-headers-686-pae | linux-headers-amd64 | linux-headers-generic | linux-headers
The following NEW packages will be installed:
  dkms wireguard-dkms
0 upgraded, 2 newly installed, 0 to remove and 3 not upgraded.
Need to get 338 kB of archives.
After this operation, 2,078 kB of additional disk space will be used.
Do you want to continue? [Y/n] 
Get:1 https://dietpi.com/meveric stretch/backports armhf wireguard-dkms all 0.0.20190123-1 [264 kB]
Get:2 https://deb.debian.org/debian stretch/main armhf dkms all 2.3-2 [74.8 kB]
Fetched 338 kB in 0s (493 kB/s)                            
Selecting previously unselected package dkms.
(Reading database ... 129787 files and directories currently installed.)
Preparing to unpack .../archives/dkms_2.3-2_all.deb ...
Unpacking dkms (2.3-2) ...
Selecting previously unselected package wireguard-dkms.
Preparing to unpack .../wireguard-dkms_0.0.20190123-1_all.deb ...
Unpacking wireguard-dkms (0.0.20190123-1) ...
Setting up dkms (2.3-2) ...
Processing triggers for man-db (2.7.6.1-2) ...
Setting up wireguard-dkms (0.0.20190123-1) ...
Loading new wireguard-0.0.20190123 DKMS files...
dpkg: warning: version '4.14.180+
4.14.231+-4.14.180+
4.14.231+' has bad syntax: invalid character in version number
dpkg: warning: version '4.14.180+
4.14.231+-4.14.180+
4.14.231+' has bad syntax: invalid character in version number
Building for 4.14.231+
Building initial module for 4.14.231+
Error! Bad return status for module build on kernel: 4.14.231+ (armv7l)
Consult /var/lib/dkms/wireguard/0.0.20190123/build/make.log for more information.
User avatar
Joulinar
Posts: 5090
Joined: Sat Nov 16, 2019 12:49 am

Re: cannot [re]install Wireguard

Post by Joulinar »

Did you checked the log file? /var/lib/dkms/wireguard/0.0.20190123/build/make.log
Can you share some more details on your device and DietPi version! Did you tried to reboot after the kernel update?
Pls let us know if a solution is working. This could help others if they hit by similar situation. Your DietPi Team
AndrewZ
Posts: 22
Joined: Mon May 01, 2017 4:34 pm

Re: cannot [re]install Wireguard

Post by AndrewZ »

DietPi v7.2.3
Device model : Odroid XU3/XU4/MC1/HC1/HC2 (armv7l)

Code: Select all

DKMS make.log for wireguard-0.0.20190123 for kernel 4.14.231+ (armv7l)
Tue 15 Jun 00:10:30 XXX 2021
make: Entering directory '/usr/src/linux-headers-4.14.231+'
  AR      /var/lib/dkms/wireguard/0.0.20190123/build/built-in.o
  CC [M]  /var/lib/dkms/wireguard/0.0.20190123/build/main.o
  CC [M]  /var/lib/dkms/wireguard/0.0.20190123/build/noise.o
  CC [M]  /var/lib/dkms/wireguard/0.0.20190123/build/device.o
  CC [M]  /var/lib/dkms/wireguard/0.0.20190123/build/peer.o
  CC [M]  /var/lib/dkms/wireguard/0.0.20190123/build/queueing.o
  CC [M]  /var/lib/dkms/wireguard/0.0.20190123/build/timers.o
  CC [M]  /var/lib/dkms/wireguard/0.0.20190123/build/send.o
  CC [M]  /var/lib/dkms/wireguard/0.0.20190123/build/receive.o
  CC [M]  /var/lib/dkms/wireguard/0.0.20190123/build/socket.o
  CC [M]  /var/lib/dkms/wireguard/0.0.20190123/build/hashtables.o
  CC [M]  /var/lib/dkms/wireguard/0.0.20190123/build/allowedips.o
  CC [M]  /var/lib/dkms/wireguard/0.0.20190123/build/ratelimiter.o
/var/lib/dkms/wireguard/0.0.20190123/build/socket.c: In function ‘send6’:
/var/lib/dkms/wireguard/0.0.20190123/build/socket.c:143:18: error: ‘const struct ipv6_stub’ has no member named ‘ipv6_dst_lookup’; did you mean ‘ipv6_dst_lookup_flow’?
   ret = ipv6_stub->ipv6_dst_lookup(sock_net(sock), sock, &dst,
                  ^~
scripts/Makefile.build:329: recipe for target '/var/lib/dkms/wireguard/0.0.20190123/build/socket.o' failed
make[1]: *** [/var/lib/dkms/wireguard/0.0.20190123/build/socket.o] Error 1
make[1]: *** Waiting for unfinished jobs....
Makefile:1553: recipe for target '_module_/var/lib/dkms/wireguard/0.0.20190123/build' failed
make: *** [_module_/var/lib/dkms/wireguard/0.0.20190123/build] Error 2
make: Leaving directory '/usr/src/linux-headers-4.14.231+'
User avatar
Joulinar
Posts: 5090
Joined: Sat Nov 16, 2019 12:49 am

Re: cannot [re]install Wireguard

Post by Joulinar »

found something similar to your issue https://www.reddit.com/r/WireGuard/comm ... on_ubuntu/

Not sure if this is something you like to try

Btw: did you run apt update && apt upgrade to have all packages updated?
Pls let us know if a solution is working. This could help others if they hit by similar situation. Your DietPi Team
AndrewZ
Posts: 22
Joined: Mon May 01, 2017 4:34 pm

Re: cannot [re]install Wireguard

Post by AndrewZ »

Thank you for looking into this issue. Yes, I've performed all the traditional passes including reboot/update/upgrade/etc.
Finally I just downloaded

Code: Select all

https://git.zx2c4.com/wireguard-linux-compat/snapshot/wireguard-linux-compat-1.0.20210606.zip
and then built it manually without dkms.
Post Reply