6.9 C
Amsterdam
Friday, December 4, 2020

How to install ODBC on Ubuntu 20.04?

Must read

How To Configure Slave BIND DNS Server On Ubuntu 20.04

In our previous guide we covered the setup of Master(Primary) DNS Server. Here we'll learn that how to configure slave bind dns server on...

Install Fossil on Linux – An alternative to Git

Hello, friends. In this post, we will talk about a serious alternative to Git. In a few words, we'll show you how to install...

How to backup and restore BCD in Windows 10

Hi! Boot Configuration Data (BCD) is a set of data where the system boot information is stored. In addition, from there the operating systems...

How To Install and Configure Master BIND DNS Server On Ubuntu 20.04

Today we are going to learn that how to install and configure Master BIND DNS server on Ubuntu 20.04. As you all know that...
angeloma
angeloma
Senior Writer and partner

Hi, folks. In this post, you will learn how to install ODBC on Ubuntu 20.04 through a free implementation. If you use this database access API a lot, it will serve you well.

In a few words, ODBC is an open specification for providing application developers with a predictable API with which to access Data Sources. Data Sources include SQL Servers and any Data Source with an ODBC Driver.

With the need for an open-source implementation and compatibility with other operating systems, unixODBC was born. This project also has a graphical interface that you can use but its potential is in the binaries that offer compatibility with this implementation.

So, let’s go for it.

Installing ODBC on Ubuntu 20.04

Upgrading the system completely is the first step in performing this tutorial.

So, open a terminal and run the following commands:

:~$ sudo apt update
:~$ sudo apt upgrade

Once the installation has been completed, all the basic tools for compiling and building packages must be installed. This can easily be done with the following command:

:~$ sudo apt install build-essential
[sudo] password for angelo:
Reading package lists… Done
Building dependency tree
Reading state information… Done
The following additional packages will be installed:
binutils binutils-common binutils-x86-64-linux-gnu cpp cpp-9 dpkg-dev fakeroot g++ g++-9 gcc gcc-9 gcc-9-base libalgorithm-diff-perl libalgorithm-diff-xs-perl
libalgorithm-merge-perl libasan5 libatomic1 libbinutils libc-dev-bin libc6-dev libcc1-0 libcrypt-dev libctf-nobfd0 libctf0 libdpkg-perl libfakeroot
libfile-fcntllock-perl libgcc-9-dev libgomp1 libisl22 libitm1 liblsan0 libmpc3 libquadmath0 libstdc++-9-dev libtsan0 libubsan1 linux-libc-dev make manpages-dev
Suggested packages:
binutils-doc cpp-doc gcc-9-locales debian-keyring g++-multilib g++-9-multilib gcc-9-doc gcc-multilib autoconf automake libtool flex bison gdb gcc-doc gcc-9-multilib
glibc-doc bzr libstdc++-9-doc make-doc
The following NEW packages will be installed:
binutils binutils-common binutils-x86-64-linux-gnu build-essential cpp cpp-9 dpkg-dev fakeroot g++ g++-9 gcc gcc-9 gcc-9-base libalgorithm-diff-perl
libalgorithm-diff-xs-perl libalgorithm-merge-perl libasan5 libatomic1 libbinutils libc-dev-bin libc6-dev libcc1-0 libcrypt-dev libctf-nobfd0 libctf0 libdpkg-perl
libfakeroot libfile-fcntllock-perl libgcc-9-dev libgomp1 libisl22 libitm1 liblsan0 libmpc3 libquadmath0 libstdc++-9-dev libtsan0 libubsan1 linux-libc-dev make
manpages-dev
0 upgraded, 41 newly installed, 0 to remove and 0 not upgraded.
Need to get 39.9 MB of archives.
After this operation, 175 MB of additional disk space will be used.
Do you want to continue? [Y/n]
1.-  Installing the build-essential package
1.- Installing the build-essential package

This will install all the dependencies we need to install unixODBC on Ubuntu 20.04

The next step is to download the unixODBC source code file. At the time of writing, the latest stable version is 2.3.7

:~$ wget ftp://ftp.unixodbc.org/pub/unixODBC/unixODBC-2.3.7.tar.gz
--2020-07-20 15:04:40-- ftp://ftp.unixodbc.org/pub/unixODBC/unixODBC-2.3.7.tar.gz
=> ‘unixODBC-2.3.7.tar.gz’
Resolving ftp.unixodbc.org (ftp.unixodbc.org)… 87.106.19.214
Connecting to ftp.unixodbc.org (ftp.unixodbc.org)|87.106.19.214|:21… connected.
Logging in as anonymous … Logged in!
==> SYST … done. ==> PWD … done.
==> TYPE I … done. ==> CWD (1) /pub/unixODBC … done.
==> SIZE unixODBC-2.3.7.tar.gz … 1669501
==> PASV … done. ==> RETR unixODBC-2.3.7.tar.gz … done.
Length: 1669501 (1.6M) (unauthoritative)
unixODBC-2.3.7.tar.gz 100%[=====================================================================================>] 1.59M 6.72KB/s in 2m 59s
2020-07-20 15:07:50 (9.12 KB/s) - ‘unixODBC-2.3.7.tar.gz’ saved [1669501]
2.- Download unixODBC on Ubuntu 20.04
2.- Download unixODBC on Ubuntu 20.04

Then decompress the generated file and go to the unixODBC folder.

:~$ tar xvzf unixODBC-2.3.7.tar.gz
:~$ cd unixODBC-2.3.7/

There you prepare the file for compilation:

:~$ ./configure --prefix=/usr/local/unixODBC
3.- configuring ODBC on Ubuntu 20.04
3.- configuring ODBC on Ubuntu 20.04

Then, using the make command to create the package

:~$ make
4.- Installing UnixODBC on Ubuntu 20.04
4.- Installing UnixODBC on Ubuntu 20.04

And finally, install it on the system by running the following command:

:~$ sudo make install

When the process is finished you can go to the /usr/local/unixODBC/bin folder and see all the binaries that have been installed.

:~$ cd /usr/local/unixODBC/bin/
:~$ ls
5.- ODBC on Ubuntu 20.04
5.- ODBC on Ubuntu 20.04

So unixODBC is ready for battle. You can now implement it and connect to various databases such as those made in Microsoft SQL Server.

Conclusion

The implementation of ODBC on Unix systems is done by unixODBC with the guarantee of being opensource and quite stable. It’s a very interesting database project that can be very useful to many professionals. So in this post, I’ve shown you how to install it from the source code.

Please share this post and join our Telegram channel.

More articles

LEAVE A REPLY

Please enter your comment!
Please enter your name here

-

Latest article

How To Configure Slave BIND DNS Server On Ubuntu 20.04

In our previous guide we covered the setup of Master(Primary) DNS Server. Here we'll learn that how to configure slave bind dns server on...

Install Fossil on Linux – An alternative to Git

Hello, friends. In this post, we will talk about a serious alternative to Git. In a few words, we'll show you how to install...

How to backup and restore BCD in Windows 10

Hi! Boot Configuration Data (BCD) is a set of data where the system boot information is stored. In addition, from there the operating systems...

How To Install and Configure Master BIND DNS Server On Ubuntu 20.04

Today we are going to learn that how to install and configure Master BIND DNS server on Ubuntu 20.04. As you all know that...

Diskpart is a very useful tool for managing storage in Windows 10.

Hello! Diskpart is an internal tool included in Windows systems that allows you to manage storage units. Indeed, it is possible to manage internal...
x