I'm starting a project that requires an external shared library third-party.so.

I've placed it in /usr/lib. However, when I run sudo ldconfig -v, it's not listed.

ldconfig -p | grep third-party.so proves that it wasn't added to the cache.

Does this mean that there is something wrong with the library? Or am I missing some detail? I've run readelf on it, and it didn't detect any surprises. Running file /usr/lib/third-party.so returns:

/usr/lib/third-party.so: ELF 64-bit LSB pie executable, x86-64, version 1 (SYSV), dynamically linked, stripped

  • -v should work. It is possible as the manual states that the library has not sufficient information to be processed automatically. – Rui F Ribeiro Jan 5 '19 at 21:11
  • 1
    I've run sudo ldconfig -v 2>&1 | grep third-party and the library isn't processed at all. – user44168 Jan 5 '19 at 21:17
  • Would you please add a file yourlib.so output to your question? – Rui F Ribeiro Jan 6 '19 at 0:03
  • @RuiFRibeiro: ok, posted it. – user44168 Jan 6 '19 at 9:36

An older colleague of mine took a look and gave the solution: the .so must have a lib prefix:


| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.