Home Download FAQ / Knowledge Base Screenshots Documentation Support Roadmap

Libraries

As Windows has .dll files, Linux has .so files. The linux .so files offer the big advantage that you can have several versions of them installed at once, as they reflect their version in their filenames. Symbolic links preserve the major versions so you can be less acurate on the version you need. You can check which librariess your program will load from which paths there is the ldd program:

yourcitserver# ldd /usr/sbin/citserver 
        linux-gate.so.1 =>  (0xffffe000)
        libssl.so.0.9.8 => /usr/lib/i686/cmov/libssl.so.0.9.8 (0xb7f4a000)
        libcrypto.so.0.9.8 => /usr/lib/i686/cmov/libcrypto.so.0.9.8 (0xb7e09000)
        libpthread.so.0 => /lib/libpthread.so.0 (0xb7df1000)
        libncurses.so.5 => /lib/libncurses.so.5 (0xb7db1000)
        librt.so.1 => /lib/librt.so.1 (0xb7da8000)
        libical.so.0 => /usr/lib/libical.so.0 (0xb7d5d000)
        libldap_r.so.2 => /usr/lib/libldap_r.so.2 (0xb7cf4000)
        libz.so.1 => /usr/lib/libz.so.1 (0xb7cde000)
        libdb-4.4.so => /usr/lib/libdb-4.4.so (0xb7be2000)
        libresolv.so.2 => /lib/libresolv.so.2 (0xb7bcf000)
        libc.so.6 => /lib/libc.so.6 (0xb7a87000)
        libdl.so.2 => /lib/libdl.so.2 (0xb7a83000)
        /lib/ld-linux.so.2 (0xb7fae000)
        liblber.so.2 => /usr/lib/liblber.so.2 (0xb7a76000)
        libcrypt.so.1 => /lib/libcrypt.so.1 (0xb7a48000)
        libsasl2.so.2 => /usr/lib/libsasl2.so.2 (0xb7a31000)
        libgnutls.so.13 => /usr/lib/libgnutls.so.13 (0xb79c3000)
        libtasn1.so.3 => /usr/lib/libtasn1.so.3 (0xb79b4000)
        libgpg-error.so.0 => /usr/lib/libgpg-error.so.0 (0xb79af000)
        libnsl.so.1 => /lib/libnsl.so.1 (0xb7997000)
        libgcrypt.so.11 => /usr/lib/libgcrypt.so.11 (0xb7946000)

You can modify the paths and which files get loaded by some environment variables:
LD_LIBRARY_PATH prepend your own paths to /etc/ld.so.conf
LD_PRELOAD load a library before everything. This way your library can overrule symbols of other libraries.

Your /etc/ld.so.conf keeps your system configuration for library paths. For performance reasons, your system creates a catalog which is looked at when you run a program. You can refresh this catalog after installing new libs with

  ldconfig
There are no social media links here. Enjoy a friendly Citadel community instead. Or go outside.
Copyright © 1987-2024 Uncensored Communications Group. All rights reserved.