Easysoft Blog

Mon, April 1 2019

Easysoft ODBC Drivers and the ODBCINST Library

ODBC applications usually link against an ODBC Driver Manager rather than a particular ODBC driver. An ODBC Driver Manager is the interface between an ODBC application and an ODBC driver. unixODBC is a Driver Manager for non-Windows platforms. This ldd command shows that the ODBC test application isql is linked against the unixODBC Driver Manager library:

$ ldd unixODBC/bin/isql
libodbc.so.1 => /usr/local/easysoft/unixODBC/lib/libodbc.so.1

Easysoft ODBC drivers aren't linked against the main unixODBC Driver Manager library, but they are linked against the unixODBC setup / config library:

$ ldd libessqlsrv.so
libodbcinst.so.1 => /usr/local/easysoft/unixODBC/lib/libodbcinst.so.1

This means that for an Easysoft ODBC driver to function, a unixODBC library named libodbcinst.so.1 (or a symbolic link) must be present on the system. Otherwise, you will get the error:

[01000][unixODBC][Driver Manager]Can't open lib 'odbc_driver' : file not found

If you choose not to install the unixODBC Driver Manager that's included in the Easysoft ODBC driver distribution, and you get this error, check that you have a library named libodbcinst.so.1 on your machine. If there are no libodbcinst.so.* files present, install unixODBC. If they are present, create a symbolic link to satisfy the Easysoft ODBC driver dependency. For example:

cd /usr/lib64
sudo ln -s libodbcinst.so.2 libodbcinst.so.1