21

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!

2
  • This could be due to some mistake in the command you are writing. recheck it
    – Mazhar
    Jun 1, 2016 at 15:45
  • @Mazhar The command is ok. All the answer are related to the kernel configration. Jun 2, 2016 at 3:12

4 Answers 4

36

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:

3
  • 1
    This worked for me on Ubuntu 18.04 but also needed to install sudo apt install openresolv. Reference: github.com/StreisandEffect/streisand/issues/1434
    – jeudyx
    Jun 24, 2020 at 17:56
  • On Raspberry Pi I ran pivpn -wg to update Wireguard which fixed the problem for me.
    – Dennie
    Jul 14, 2020 at 6:39
  • 0 upgraded, 0 newly installed, 0 to remove and 94 not upgraded. Jan 20 at 10:10
4

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.

1
  • 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. Jan 11, 2020 at 12:37
1

Update the kernel version to 4.17 or above

1
  • 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.
    – jerblack
    Apr 1, 2021 at 2:05
0

For me the solution was to disable the secure boot in the bios / uefi and then to reboot my laptop. After that, no more "RTNETLINK answers: Operation not supported" issue !

Not the answer you're looking for? Browse other questions tagged or ask your own question.