Article 596E8 Dynamic library won't link

Dynamic library won't link

by
bgoodwin
from LinuxQuestions.org on (#596E8)
My freshly compiled program (monitor-exec) wants /usr/local/lib64/libbpf.so.

$./monitor-exec
:error while loading shared libraries: libbpf.so: cannot open shared object file: No such file or directory.

$ldd monitor-exec

linux-vdso.so.1 (0x00007ffc6b174000)
libelf.so.1 => /usr/lib/x86_64-linux-gnu/libelf.so.10x00007efc33ec5000)
------->libbpf.so => /usr/local/lib64/libbpf.so (0x00007efc33cb9000)
libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x00007efc338c8000)
libz.so.1 => /lib/x86_64-linux-gnu/libz.so.1 (0x00007efc336ab000)
/lib64/ld-linux-x86-64.so.2 (0x00007efc340df000)

The problem is, the library is actually there.

$ls -l /usr/local/lib64/libbpf.so
-rwxr-xr-x 1 root root 86912 Oct 16 15:38 /usr/local/lib64/libbpf.so

I've also tried running it as sudo but no joy.

Thanks for any clarification you can give.

Best regards,
Bob G.latest?d=yIl2AUoC8zA latest?i=DO-jOGaba6E:my4FOOWxdAU:F7zBnMy latest?i=DO-jOGaba6E:my4FOOWxdAU:V_sGLiP latest?d=qj6IDK7rITs latest?i=DO-jOGaba6E:my4FOOWxdAU:gIN9vFwDO-jOGaba6E
External Content
Source RSS or Atom Feed
Feed Location https://feeds.feedburner.com/linuxquestions/latest
Feed Title LinuxQuestions.org
Feed Link https://www.linuxquestions.org/questions/
Reply 0 comments