Easysoft Blog

Tue, March 19 2019

The LD_DEBUG Environment Variable

To connect to an ODBC data source, an application needs to be able to locate and load an ODBC Driver Manager library, which in turn needs to be able to locate and load the target ODBC driver library.

If the libraries aren't present on your system, or they are in a location that the user who is running the application doesn't have permissions to access, or the environment has not beeen set so that the dynamic linker can find them, the ODBC connection will fail. Even if the ODBC libraries are present, some further dependent libraries may be the root cause of the problem, e.g., they may be installed in a non-standard location.

The LD_DEBUG environment variable enables you to turn on dynamic linker debugging, which will show whether loading a particular library has succeeded. It provides an alternative to strace. For example:

LD_DEBUG=libs /usr/local/easysoft/unixODBC/bin/isql -v SQLSERVER_SAMPLE