Iperf: Iperf -s

Created on 3 Feb 2016  ·  9Comments  ·  Source: esnet/iperf

While executing the command iperf -s its throwing error

iperf3: symbol lookup error: iperf3: undefined symbol: iperf_create_pidfile

Regards.,
Surendar

question

Most helpful comment

removing libiperf0 resolved this issue for me.

apt-get purge libiperf0

All 9 comments

+1

Confirmed on Ubuntu 15.10

Maybe the iperf3 shared library (if it was built that way, as is the default) isn't in the loader search path? On some UNIX-like systems you can reload the loader search path by running ldconfig.

If that doesn't help you, then please provide some more information such as what OS and distribution you're using, and how you have installed iperf (e.g. compiled from source and make install, packaged executable, etc.).

I'm on Ubuntu 14.04 and get the same error, tried running ldconfig but doesn't help.
Installed iperf from packaged executable.

Have the same issue on clean Debian Jessie install. Cloned from git. ./configure && make && make install.

So, I narrowed it down. The reason why we only get undefined on iperf_create_pidfile, is probably because we had installed the iperf3 package from apt, and when removing that, the library was left behind (even when doing dpkg --purge iperf3). This resulted in an old libiperf.so.0being used. This had some undefined;

root@foobar:~/iperf3-git# ldd -d -r /usr/local/bin/iperf3 
    linux-vdso.so.1 (0x00007ffec4390000)
    libiperf.so.0 => /usr/lib/x86_64-linux-gnu/libiperf.so.0 (0x00007fe7f4e6a000)
    libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x00007fe7f4abf000)
    /lib64/ld-linux-x86-64.so.2 (0x000055aa474ef000)
undefined symbol: iperf_delete_pidfile  (/usr/local/bin/iperf3)
undefined symbol: iperf_create_pidfile  (/usr/local/bin/iperf3)
undefined symbol: iperf_get_test_one_off    (/usr/local/bin/iperf3)

The solution was pretty straight forward;

make uninstall
make clean
./configure
make -j20
make install
rm /usr/lib/x86_64-linux-gnu/*iperf*
ldconfig

And voilá;

root@foobar:~/iperf3-git# /usr/local/bin/iperf3 --version
iperf 3.1
Linux foobar 4.2.8-1-pve #1 SMP Fri Feb 26 16:37:36 CET 2016 x86_64
Optional features available: CPU affinity setting, IPv6 flow label, TCP congestion algorithm setting, sendfile / zerocopy

The make install should probably invoke ldconfig so that libraries are updated.

Thanks @jallakim for posting a workaround! I was at one time trying to figure out how do ldconfig automatically, but it got complicated because not every platform uses ldconfig (MacOS in particular does some other command for a similar function). There's probably an issue still in the GitHub issue tracker for this exact problem.

removing libiperf0 resolved this issue for me.

apt-get purge libiperf0

@tingvold, the workaround works for my situation. So basically, your ways is firstly to uninstall and then install. I guess the most important option is "ldconfig"

Was this page helpful?
0 / 5 - 0 ratings