I'm trying to run some code using the <unbound.h> library. I'm using an example from the Unbound docs.
I compiled and installed Unbound, following these steps.
Now, I can compile the example using
gcc -o example eample_1.c -I/usr/local/include -L/usr/local/lib -lunbound
When running ./example
I get the following error:
./example: error while loading shared libraries: libunbound.so.8: cannot open shared object file: No such file or directory
However, when I go to /usr/local/lib, I can see libunbound.so.8 and other .so files.
Why can't the linker find this file on run-time?
EDIT:
I fixed it by running /sbin/ldconfig.