How to fix unixODBC "Can't open lib 'postgresql': file not found" on Linux

Problem:

When you try to connect to a PostgreSQL database using a ODBC application such as KiCAD (database library connection), you see the following error message:

example.txt
[unixODBC][Driver Manager]Can't open lib 'postgresql' : file not found

Solution

First, install the ODBC PostgreSQL driver adapter:

example.sh
sudo apt -y install odbc-postgresql

Using that driver, you would typically use a driver setting such as

example.txt
Driver={PostgreSQL Unicode}

 


Check out similar posts by category: Databases, KiCAD, Linux