My software tool has some external dependencies. I am distributing it as a conda package for linux64 with precompiled dependencies including shared libraries. Unfortunately I don't know how to recognize the system libraries from the software-specific ones. I think distributing libs like libc is not necessary and even should be avoided, because different Linux distros can have specific versions of some system libs.
I am using this simple oneliner to export shared libs (source):
$ ldd file | grep "=> /" | awk '{print $3}' | xargs -I '{}' cp -v '{}' /destination
For example, these are the shared libs for Tesseract software:
$ ldd tesseract.bin
linux-vdso.so.1 => (0x00007ffff4bc7000)
libtesseract.so.4 => not found
liblept.so.5 => not found
libstdc++.so.6 => /usr/lib/x86_64-linux-gnu/libstdc++.so.6 (0x00007f0ad8bf3000)
libgcc_s.so.1 => /lib/x86_64-linux-gnu/libgcc_s.so.1 (0x00007f0ad89dc000)
libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x00007f0ad8615000)
libm.so.6 => /lib/x86_64-linux-gnu/libm.so.6 (0x00007f0ad830a000)
/lib64/ld-linux-x86-64.so.2 (0x0000563cf6115000)
As you can see, only libtesseract.so.4 and liblept.so.5 are software-specific libs (not found because they aren't in LD_LIBRARY_PATH).
So is there any way to recognize the system shared libraries? I can check if they are in /lib, but is this always true? Are there only system libs so they can't be somewhere else?