I have been trying to solve this for several hours. I am compiling some c files with gcc. Files require libpbc, so I use the -L flag to specify gcc in the directory that contains libpbc.so.1. The code compiles without errors, but when I try to run it, I get the following error message:
./example.out: error loading shared libraries: libpbc.so.1: cannot open shared objects file: no such file or directory
If you look at such questions, this error message seems to indicate that gcc cannot find libpbc.so.1. I know that gcc sees libpbc.so.1 because when I rename libpbc.so.1 to something else, it does not compile.
I use -L to point to the directory containing libpbc.so.1.
I donβt know what steps I can take to understand this. Any ideas will be appreciated. What does this error message mean?
EDIT
Running ldd example.out results in:
linux-gate.so.1 => (0xb7fe3000) libpbc.so.1 => not found libgmp.so.3 => /usr/lib/libgmp.so.3 (0xb7f87000)
source share