Dave Mateer
Dave Mateer

Reputation: 17946

Cannot access local shared library from /usr/local/lib

I'm venturing into the world of C++ and Linux, and am having problems linking against a shared library.

I have a library, libicuuc.so.44.1, installed in /usr/local/lib. There is also a link in the same directory, libicuuc.so.44 pointing to that library.

My /etc/ld.so.conf reads:

include /etc/ld.so.conf.d/*.conf

I have a file, /etc/ld.so.conf.d/libc.conf, that contains:

# libc default configuration
/usr/local/lib

However, when I compile my program (that includes LIBS += -licuuc), I get the following error at runtime:

error while loading shared libraries: libicuuc.so.44: cannot open shared object file: No such file or directory

I am using Qt Creator on Ubuntu 10.04.

Any help is greatly appreciated!

Upvotes: 2

Views: 3220

Answers (1)

Tristram Gräbener
Tristram Gräbener

Reputation: 9711

Did you modify by yourself /etc/ld.so.conf.d/libc.conf ?

If yes, then run (as root) ldconfig to re-read the config.

Upvotes: 6

Related Questions