Zhixian's Tech Blog


How to install FreeTDS on Ubuntu

Filed under: computing — Tags: , , , , , , , — Zhixian @ 17:47:06 pm

This post describes the steps carried out to build freetds from source files.
It then go on to describe the steps carried out to install freetds.

This is part of my “How to connect to Sql Server from Ubuntu” series of blog post.


  1. The version of Ubuntu used in this guide is Ubuntu 12.04.2 LTS (Precise Pangoline) 32-bit.
  2. You are trying to connect to Microsoft Sql Server 2008 or later.
  3. You know how to use a terminal session in Ubuntu.
  4. You have installed unixodbc.

Required materials

  1. freetds (as of this writing, latest version is 0.91.89)
    Database driver that would allow us to connect to Sybase/Sql Server database servers.
    (download from

freetds installation steps overview

  1. Download source code for freetds. I assume you know how to do this.
  2. Extract source code out of freetds gzipped package
  3. Compile and install freetds . This involves the following steps:
    1. ./configure
    2. make
    3. make install

Extract source code out of freetds gzipped package

1) Assuming you downloaded the freetds gzip file to a directory call Downloads in your home directory, you should see something like the below in your file manager:


2)  Right-click on the package.
A popup menu should appear.
Select the menu item “Extract Here” to extract the contents of the package.


3) After the contents are extracted, you should now see a screen like the below in the file manager:



Compile freetds

1) Start a terminal session.
Navigate to the directory where you extract the freetds source files.


2) Configure the compilation process by typing ./configure on the command line.


This step checks to make sure that the system has all the required components needed to build freetds.

3) If there are no error messages in the configuration, proceed to build freetds by typing make on the command line.


4) Assuming the compilation succeed, you can proceed to install freetds onto your system.
You do this by typing make install on the command line.


If for some reason your user account do not have sufficient persmissions to install freetds, you will probably see error messages in the terminal .
This means you need to use a superuser account to install freetds.
In which case you would type sudo make install on the command line instead.


5. After installation, you should get a screen like the below:


With this, you have installed freetds into your Ubuntu system.


Leave a Comment »

No comments yet.

RSS feed for comments on this post. TrackBack URI

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

Blog at WordPress.com.

%d bloggers like this: