So I build a simple C program with -libconfig
and -L /usr/lib64/
something like:
clang *.c -o app -L /usr/lib64/ -lconfig
I'm using centos6 and got the library here /usr/lib64/libconfig.so.8
It builds all fine but when I run it I get this:
error while loading shared libraries: libconfig.so.9: cannot open shared object file: No such file or directory
Obviously it looks for a greater version of the library but I can't explain why. Just installing/upgrading libconfig.so.9 is also not an option.
Update
I took the advice from the comments and removed the unnecessary -L
parameter but that didn't change anything. I still get the same error.
$ ll -s /usr/lib64/libconf*
0 lrwxrwxrwx. 1 root root 18 Dec 15 2015 /usr/lib64/libconfig.so -> libconfig.so.8.0.0
0 lrwxrwxrwx. 1 root root 20 Dec 15 2015 /usr/lib64/libconfig++.so -> libconfig++.so.8.0.0
0 lrwxrwxrwx. 1 root root 18 Dec 15 2015 /usr/lib64/libconfig.so.8 -> libconfig.so.8.0.0
0 lrwxrwxrwx. 1 root root 20 Dec 15 2015 /usr/lib64/libconfig++.so.8 -> libconfig++.so.8.0.0
44 -rwxr-xr-x. 1 root root 41960 Aug 19 2010 /usr/lib64/libconfig.so.8.0.0
88 -rwxr-xr-x. 1 root root 87408 Aug 19 2010 /usr/lib64/libconfig++.so.8.0.0
ldconfig -v | grep libconfig
libconfig.so.8 -> libconfig.so.8.0.0
libconfig++.so.8 -> libconfig++.so.8.0.0
These lines look very ordinary and OK to me. Still no clue.