mopodafordeya
mopodafordeya

Reputation: 635

ldconfig cache not updated for copied library

I would like to make my custom shared library "libfoo.so" listed in system search path.

1, build libfoo.so.1.2 with soname libfoo.so.1 2, copy both into /lib64/ and create linker name syslink for libfoo

libfoo.so -> libfoo.so.1.2
libfoo.so.1 -> libfoo.so.1.2
libfoo.so.1.2

3, run

sudo ldconfig

Note: Tried to delete ldconfig cache: ld.so.cache and regenerate, still no luck. Reboot and not working /lib64/ is listed under /etc/ld.so.conf

however the ldconfig cache does not list libfoo and therefore my app that depends on libfoo will fail.

What am I missing?

Upvotes: 0

Views: 2698

Answers (1)

mopodafordeya
mopodafordeya

Reputation: 635

This is due to our shared library does not following GNU naming convention. lib.so

Without the prefix lib*, ldconfig will not add syslink to cache.

Upvotes: 1

Related Questions