3

I'm running this command nl-qdisc-add --dev=veth-host --parent=root plug --limit=32768

It throws an error of Error: Unable to load module "/usr/lib/x86_64-linux-gnu/libnl/cli/qdisc/plug.so": /usr/lib/x86_64-linux-gnu/libnl/cli/qdisc/plug.so: cannot open shared object file: No such file or directory

I looked into the folder and found that there was another folder present named libnl-3 with same files. I can't even rename it to run the command.

How can i resolve this? Even if i successfully rename the folder, it may cause errors in future. So I think the problem is why this command is not looking for libnl-3 package instead of libnl.

user13145713
  • 109
  • 8
  • This looks like a packaging bug. What Linux distribution / version is this and how did you install libnl? – f9c69e9781fa194211448473495534 Oct 08 '20 at 18:48
  • Its `ubuntu 19.10`, and about installing it i don't remember actually(installed it months back) as`libnl` was not available so installed `libnl-3` by doing `sudo apt-get install libnl-3-*` or `sudo apt-get install libnl-3-dev` – user13145713 Oct 08 '20 at 19:08
  • kernel-verson : `5.3.0-64-generic` – user13145713 Oct 08 '20 at 19:24
  • 1
    I tried running that Ubuntu version in a docker container (`docker pull ubuntu:19.10`, `docker run -it ubuntu:19.10`) and I can reproduce your problem. So it seems `libnl-utils` is compiled incorrectly in Ubuntu. While 19.10 has reached end-of-life, the same problem can also be reproduced in 20.04, which should still be supported by the Ubuntu developers. This bug should probably be reported to them, so that they can fix the package. – f9c69e9781fa194211448473495534 Oct 08 '20 at 20:36
  • 2
    In the meantime, the easiest way might be to compile it yourself. The following worked for me: 1) `apt-get install build-essential pkg-config bison flex` 2) `git clone https://github.com/tgraf/libnl` and then in the libnl folder 3) `./autogen.sh` 4) `./configure --prefix=/usr/local --pkglibdir=/usr/local/lib` 5) `make` 6) `make install` and finally 7) `LD_LIBRARY_PATH=/usr/local/lib /usr/local/sbin/nl-qdisc-add --dev=eth0 --parent=root plug --limit=32768`. – f9c69e9781fa194211448473495534 Oct 08 '20 at 20:53
  • 1
    @f9c69e9781fa194211448473495534 as per point 7 So, everytime i have to hard code the `dev` and `limit` it in the `LD_LIBRARY_PATH`.? – user13145713 Oct 09 '20 at 21:44
  • 1
    No, the `LD_LIBRARY_PATH` is just for pointing the binary to the libraries in `/usr/local/lib`. You could also do `export LD_LIBRARY_PATH=/usr/local/lib` to set the variable for the current console session and then just use `/usr/local/sbin/nl-qdisc-add --dev=eth0 --parent=root plug --limit=32768`. – f9c69e9781fa194211448473495534 Oct 09 '20 at 23:33

0 Answers0