3

I have set up a radius-server on a raspberry-pi. Now I want to test it according to article 6.2.1 in http://networkradius.com/doc/FreeRADIUS-Implementation-Ch6.pdf Unfortunately building the "eapol_test" file as described in the document doesnt work for me. When executing

make eapol_test

in the newly created folder it runs for a minute or so and then exits, saying

/usr/bin/ld: cannot find -lnl
collect2: ld returned 1 exit status
Makefile:1625: recipe for target 'eapol_test' failed

Using a newer version of wpa_supplicant doesnt solve it. I dont know much about the make command, or how to make it find "-lnl" (whatever this might be) and I couldn't find a solution to this problem either.

Does anyone know how to fix this? Thank you in advance

vicco
  • 1,049
  • 2
  • 14
  • 33
  • `-lnl` is telling `ld` to look for the `nl` library (`libnl.so`, etc.). – Etan Reisner Mar 18 '15 at 14:55
  • which means that I am missing this library? – vicco Mar 18 '15 at 14:57
  • Or it isn't in a standard path, yes. – Etan Reisner Mar 18 '15 at 15:01
  • Okay, now how do i fix this? – vicco Mar 18 '15 at 15:02
  • 1
    Install it (or add the path to it to the compilation with `-L`). I can't be more specific than that unfortunately since I don't know how your raspberry is set up. – Etan Reisner Mar 18 '15 at 15:49
  • Okay, thank you for your help. I tried installing it, but i honestly don't know how, since apt-get doesn't seem to know it. The Raspberry has the latest Raspbian installed and i havent done anything with it besides installing freeradius and openssl. – vicco Mar 18 '15 at 15:56
  • `apt-cache search libnl`? Looks like maybe `libnl1` or `libnl-3-200` maybe. – Etan Reisner Mar 18 '15 at 16:09
  • Thank you. It worked, but now the compiling stops at another point. It says " eventc. In function wpa_supplicant_scard_init \ events.c:207:24 error: variable type set but not used [-Werror=unused-but-set-variable] " – vicco Mar 19 '15 at 09:25
  • That's a compilation error with the `gcc` flags in use. If the project itself wrote that code and specified that compiler flag that's an error on their part. If you specified that flag you can stop doing that. In either case that's an "error" in the C code that the authors of the project should probably fix. – Etan Reisner Mar 19 '15 at 11:46
  • Well, then there is nothing i can do about it, i assume. Nevertheless, thank you for trying to help me. – vicco Mar 19 '15 at 12:13
  • Okay, after having given up all hope, I tried the same with the newest version again and it worked. Should have thought of this earlier. – vicco Mar 19 '15 at 12:48

1 Answers1

6

In case someone stumbles upon this (like I did from a Google result), following solves this issue (Debian Jessie / wpa_supplicant-2.5 from source):

Install libnl-3-dev and symlink libnl-3.so to libnl.so

# apt-get install libnl-3-dev
# ln -s /lib/x86_64-linux-gnu/libnl-3.so /lib/x86_64-linux-gnu/libnl.so
# make clean
# make eapol_test
NrY
  • 141
  • 2
  • 4
  • 2
    On CentOS 6.8 yum install libnl3-devel ln -s /usr/lib64/libnl-3.so /usr/lib64/libnl.so make clean make eapol_test – Dan-Dev Sep 30 '16 at 10:49