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.
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
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.
tar xvzf unixODBC-2.3.11.tar.gz
This will generate a folder with the ODBC name and version. Access it.
Now configure it to prepare for compilation
Then, compile it
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.
ODBC is one of Microsoft’s tools for database connections, having it in Linux opens the doors of development to other possibilities.