How to Install the Firebird ODBC Driver on Linux

By Pavel Cisar


The unixODBC package must be installed Firebird must also be installed

The ODBC driver packages for Linux are gzipped tar files. After gunzip they should be processed by tar, or you can rename them to *.tar.gz and use Midnight Commander to unpack them (for example).

To build from sources (recommended), requires the development package for unixODBC:

  1. Download and unpack the Firebird driver sources
  2. Rename "makefile.linux" in .source/Builds/Gcc.lin to "makefile"
  3. Set the evironment variables FBINCDIR (Firebird include directory) and FBLIBDIR (Firebird lib directory) if necessary.
  4. Run make (this creates the library in a subdirectory)
  5. It's possible to copy the library to /usr/local/lib64 (or any preferred directory) or run: make install (this symlinks the library from the unixODBC directory)

To install from the binary package:

  1. Copy to /usr/local/lib64 or any other desired destination directory.

Configuration, depends on the Linux distribution, but somewhere in /etc or /etc/unixODBC should be two files:

odbc.ini and odbcinst.ini

Add to odbcinst.ini:

Description     = InterBase/Firebird ODBC Driver
Driver          = /usr/local/lib64/
Setup           = /usr/local/lib64/
Threading       = 1
FileUsage       = 1
CPTimeout       =
CPReuse         =

Add to odbc.ini:

Description     = Firebird
Driver          = Firebird
Dbname          = localhost:/opt/firebird/examples/empbuild/employee.fdb
User            = SYSDBA
Password        = masterkey
Role            =
CharacterSet    =
ReadOnly        = No
NoWait          = No

You can test the connection using UnixODBC ISQL (not Firebird's) using the following:

isql -v employee

If you have connection problems, make sure that the directory where you placed the Firebird ODBC shared library (/usr/local/lib64/ is on the system loadable library path. if not you could set

export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/lib/odbc or more simply export LD_LIBRARY_PATH=/usr/lib/odbc

If you still have problems then the next thing is to try the following and see if you can see what the problem is.

strace -o output.txt isql -v employee