How to install ODBC on Debian 11?

Everything Linux, A.I, IT News, DataOps, Open Source and more delivered right to you.
Subscribe
"The best Linux newsletter on the web"

Hello, friends. This short post for newbies will teach you how to install ODBC on Debian 11.

ODBC is a specification for a database API. This API is independent of any DBMS or operating system; although this manual uses C, the ODBC API is language-independent.

By using ODBC statements in a program, it is possible to access files from different databases, including Access, dBase, DB2, Excel and Text.

The main sponsor and promoter of ODBC is Microsoft, who uses it to access SQL server. One of the advantages is that we can include it in Linux and get the benefits of it.

Let’s go.

Install ODBC on Debian 11

First open a terminal and make sure that the system is up-to-date

sudo apt update
sudo apt upgrade

Next, install all the packages to compile from source code. These packages can be installed by running.

sudo apt install build-essential

With those packages ready, then the next thing to do is to download the ODBC source code

wget http://www.unixodbc.org/unixODBC-2.3.11.tar.gz
Download ODBC on Debian 11
Download ODBC on Debian 11

As always, it is advisable to check which is the latest stable version and modify the command. To achieve this, visit the ODBC download section and then modify the command as such.

Decompress it

tar xvzf unixODBC-2.3.11.tar.gz

This will generate a folder with the ODBC name and version. Access it.

cd unixODBC-2.3.11/

Now configure it to prepare for compilation

./configure --prefix=/usr/local/unixODBC

Then, compile it

make

Finally, install it

sudo make install

This should generate the corresponding binaries.

To verify, access /usr/local/unixODBC/bin and display the files

ls /usr/local/unixODBC/bin
dltest  isql  iusql  odbc_config  odbcinst  slencheck

And you are done. The process is quite easy.

Conclusion

ODBC is one of Microsoft’s tools for database connections, having it in Linux opens the doors of development to other possibilities.

Everything Linux, A.I, IT News, DataOps, Open Source and more delivered right to you.
Subscribe
"The best Linux newsletter on the web"
Angelo
Angelo
I am Angelo. A systems engineer passionate about Linux and all open-source software. Although here I'm just another member of the family.

LEAVE A REPLY

Please enter your comment!
Please enter your name here

Latest articles

Join us on Facebook