This is a common error when one forgets to point the application elf the path for libraries. When DPDK libraries are built with shared mode, one has to specify the path to dpdk shared object via LD_LIBRARY_PATH
. In failing to do so we get
# ldd app/testpmd
linux-vdso.so.1 (0x00007fff3eeb2000)
librte_pmd_bond.so.2.1 => not found
librte_pmd_dpaa.so.1.1 => not found
librte_pmd_ixgbe.so.2.1 => not found
librte_pmd_i40e.so.2.1 => not found
librte_pmd_bnxt.so.2.1 => not found
librte_pmd_softnic.so.1.1 => not found
librte_pdump.so.2.1 => not found
librte_metrics.so.1.1 => not found
librte_bitratestats.so.2.1 => not found
librte_latencystats.so.1.1 => not found
librte_bpf.so.1.1 => not found
librte_gro.so.1.1 => not found
librte_gso.so.1.1 => not found
librte_mbuf.so.4.1 => not found
librte_net.so.1.1 => not found
librte_ethdev.so.11.1 => not found
librte_mempool.so.5.1 => not found
librte_ring.so.2.1 => not found
librte_eal.so.9.1 => not found
librte_cmdline.so.2.1 => not found
libpthread.so.0 => /lib/x86_64-linux-gnu/libpthread.so.0 (0x00007f1474089000)
libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x00007f1473c98000)
/lib64/ld-linux-x86-64.so.2 (0x00007f14745cf000)
Thereby running the application we get
# ./app/testpmd
./app/testpmd: error while loading shared libraries: librte_pmd_bond.so.2.1: cannot open shared object file: No such file or directory
To fix the error, as mentioned above use
export LD_LIBRARY_PATH=[path to dpdk shared libraries]
this resolves the dependencies and application runs.
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…