RTNETLINK answers: Operation not supported

40,866

Solution 1

I got a similar error, you should try this:

# apt-get install wireguard-dkms wireguard-tools linux-headers-$(uname -r)

It worked for me, kernel headers missing :shrug:

Solution 2

Maybe you're missing linux-headers. That was my case when I tried to install wireguard and got similar error after typing sudo ip link add dev wg0 type wireguard.

I resolved this by installing the linux-headers corresponding to my kernel version. In my case, I had kernel version 4.9.0-8-amd and so I installed the package linux-headers-4.9.0-8-amd:

sudo apt install linux-headers-4.9.0-8-amd

There is little informations about this on the internet and I had to find this on the wiki of ArchLinux.

Solution 3

Update the kernel version to 4.17 or above

Share:
40,866

Related videos on Youtube

DABIANZHIXING
Author by

DABIANZHIXING

Updated on December 21, 2020

Comments

  • DABIANZHIXING
    DABIANZHIXING over 3 years

    In fact, I want to use pipework to add an ipoib interface into docker container. Pipework use ip command to do this. But when running the command...

    ip link add link ib0 name ib0.2613 type ipoib
    

    I get

    RTNETLINK answers: Operation not supported

    I searched google and find this

    It list all the kernel configuration that iproute2 need. I try this ,but it dosn't work for me. My OS is "3.19.0-25-generic #26~14.04.1-Ubuntu".

    Any help would be appreciate!

  • SommerEngineering
    SommerEngineering over 4 years
    This problem can also occur later. Say WireGuard was installed correctly. After a few weeks there will be a kernel update, which will be installed. From this point on, the old headers no longer fit the new kernel. I have discussed the issue in my blog post.
  • jeudyx
    jeudyx almost 4 years
    This worked for me on Ubuntu 18.04 but also needed to install sudo apt install openresolv. Reference: github.com/StreisandEffect/streisand/issues/1434
  • Dennie
    Dennie almost 4 years
    On Raspberry Pi I ran pivpn -wg to update Wireguard which fixed the problem for me.
  • jerblack
    jerblack about 3 years
    I was 4.19 on Debian Buster and I had this problem. It was resolved by upgrading to kernel version 5.10 from buster backports.

Related