8

I installed Ubuntu just today to run WireGuard

I then followed their installation instructions for Ubuntu.

sudo add-apt-repository ppa:wireguard/wireguard
sudo apt-get update
sudo apt-get install wireguard-dkms wireguard-tools

Unfortunately their 'Quick start' has been anything, but...

$ ip link add dev wg0 type wireguard
RNETLINK answers: Operation not supported 

I checked headers, checked updates, etc. No dice.

6 Answers 6

7

I face the same problem.... but I fix that by luck when I tried to install it with source compile in Wireguard website. I run the following and it is resolved:

sudo apt-get install libmnl-dev libelf-dev linux-headers-$(uname -r) build-essential pkg-config
1
  • 1
    Thanks. This solved the issue in my case. So, the overall process was: sudo add-apt-repository ppa:wireguard/wireguard sudo apt-get update sudo apt-get install wireguard sudo apt-get install libmnl-dev libelf-dev linux-headers-$(uname -r) build-essential pkg-config Jul 6, 2019 at 17:11
4

Just reboot, that should have fixed your problem.

But still: Wireguard although it works fine for me is still in beta and not meant for daily use. From the developers website at wireguard.com:

Warning: WireGuard is currently under development, and therefore any installation steps here should be considered as experimental. We are rapidly working toward mainline inclusion, at which point we will consider this codebase non-experimental.

1
  • Yup, this did the trick for me on Ubuntu 18.04. While this worked initially, at some point it became necessary to reboot before starting the service. Does anyone have a link to the upstream bug report?
    – colan
    Jul 15, 2020 at 2:35
4

Most probably the wireguard kernel module is not loaded. Just try a modprobe wireguard. If this shows an error, the problem is that the module did not compile correctly for your kernel. This, most probably, is because wireguard is still not completely "stable".

If this is the case, just wait for an update of wireguard, in case of such an error this should be the case within a few days, as the wireguard devs seem to fix these kind of problems very fast.

1

With 18.04 bionic the wireguard dkms module wasn't built with a version of a 4.15.x kernel + headers for me (it was though in the past?). When upgrading to the recently available "hardware enablement" 4.18 kernel the module was successfully built (see output of dpkg-reconfigure wireguard or dkms status wireguard).

Check for necessary desktop/server package(s) installs in the ubuntu wiki.

1

Fixed this issue by upgrading kernel to 4.15.0-128-generic

lsmod | grep wireguard gives output

wireguard             221184  0
ip6_udp_tunnel         16384  1 wireguard
udp_tunnel             16384  1 wireguard
1

I did a few things. I'm not sure whether individual or a combination of them helped.

  • disable secure boot
  • reboot my laptop (Ubuntu 17.10)

One thing that is worth mentioning: after those actions, I ran commands to set up WireGuard successfully with sudo. Previously, I couldn't.

You must log in to answer this question.

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