Development discussion of WireGuard
 help / color / mirror / Atom feed
From: Joe Doss <joe@solidadmin.com>
To: wireguard@lists.zx2c4.com
Subject: Re: trouble installing on Fedora and CentOS
Date: Tue, 8 Aug 2017 20:51:37 -0500	[thread overview]
Message-ID: <0774b643-23a3-5e57-c4db-889db42ae7eb@solidadmin.com> (raw)
In-Reply-To: <CAJkVDg1O8SXWtR1cazOMQX6U-sxRVh57MNfTdNGBLpCUdOPnog@mail.gmail.com>

Hey Adam,

Thanks for using WireGuard. See my response below.

On 08/08/2017 02:58 PM, adam souzis wrote:
> I've been impressed with Wireguard, its design has helped simplify the 
> implementation of a distributed sandbox app I am building quite a bit. 
> But I have had mixed results getting it running on different distributions.
> 
> The good news is that I can report that I was able to build, install and 
> run Wireguard on CoreOs.
> 
> The bad news is I was unable to get Wireguard working on either CentOS 
> 7, Fedora 26 or Fedora 25 (running these on AWS), it doesn't appear to 
> be installing the kernel module properly.
> 
> Here's what I see when install the RPM:
> 
> + dkms add -m wireguard -v 0.0.20170629 -q --rpm_safe_upgrade
> 
> + dkms build -m wireguard -v 0.0.20170629 -q
> 
> + dkms install -m wireguard -v 0.0.20170629 -q
> 
> D: %post(wireguard-dkms-1:0.0.20170629-2.fc25.noarch): waitpid(14760) rc 
> 14760 status 100
> 
> warning: %post(wireguard-dkms-1:0.0.20170629-2.fc25.noarch) scriptlet 
> failed, exit status 1
> 
> Non-fatal POSTIN scriptlet failure in rpm package wireguard-dkms
Are you running into this issue on a freshly provisioned server? Or 
after you do a system update? Do you reboot into the most current kernel 
if you do update? Does the kernel update along with kernel-devel and 
kernel-headers?

This issue is caused by you running a kernel that doesn't have the 
correct kernel-header package installed:

[root@localhost ~]# dkms status
wireguard, 0.0.20170726: added

[root@localhost wireguard-0.0.20170726]# dkms build -m wireguard -v 
0.0.20170726
Error! echo
Your kernel headers for kernel 4.11.8-300.fc26.x86_64 cannot be found at
/lib/modules/4.11.8-300.fc26.x86_64/build or 
/lib/modules/4.11.8-300.fc26.x86_64/source.

[root@localhost ~]# uname -a
Linux localhost.localdomain 4.11.8-300.fc26.x86_64 #1 SMP Thu Jun 29 
20:09:48 UTC 2017 x86_64 x86_64 x86_64 GNU/Linux

[root@localhost ~]# rpm -qa |grep kernel
kernel-devel-4.11.11-300.fc26.x86_64
kernel-core-4.11.8-300.fc26.x86_64
kernel-headers-4.11.11-300.fc26.x86_64

I just tested the latest package on Vagrant and it works after running a 
dnf update and rebooting into the most current kernel that matches the 
currently installed kernel headers package.

[root@localhost ~]# uname -a
Linux localhost.localdomain 4.11.11-300.fc26.x86_64 #1 SMP Mon Jul 17 
16:32:11 UTC 2017 x86_64 x86_64 x86_64 GNU/Linux

[root@localhost ~]# rpm -qa |grep kernel
kernel-devel-4.11.11-300.fc26.x86_64
kernel-core-4.11.8-300.fc26.x86_64
kernel-headers-4.11.11-300.fc26.x86_64
kernel-core-4.11.11-300.fc26.x86_64

[root@localhost ~]# dkms build -m wireguard -v 0.0.20170726
Module wireguard/0.0.20170726 already built for kernel 
4.11.11-300.fc26.x86_64/4

[root@localhost ~]# ip link add dev wg0 type wireguard

[root@localhost ~]# wg show
interface: wg0

You either want to install the kernel-headers package that matches your 
currently running kernel or dnf update and reboot, then DKMS will auto 
build the WireGuard kernel module on boot.

Joe

--
Joe Doss
joe@solidadmin.com

  parent reply	other threads:[~2017-08-09  1:29 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-08-08 19:58 adam souzis
2017-08-08 20:08 ` Bruno Wolff III
2017-08-08 22:49   ` adam souzis
2017-08-08 23:21 ` Jason A. Donenfeld
2017-08-09  1:51 ` Joe Doss [this message]
2017-08-09 12:39   ` adam souzis
2017-08-09 14:54     ` Joe Doss

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=0774b643-23a3-5e57-c4db-889db42ae7eb@solidadmin.com \
    --to=joe@solidadmin.com \
    --cc=wireguard@lists.zx2c4.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).