Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have installed unixodbc for Microsoft SQL Server support in Linux. I want to connect PHP on Linux to a MS SQL server. I tried to install FreeTDS opensource , but it gives me following error.

/usr/bin/ld: cannot -lodbcinst

What is best way to install FreeTDS?

share|improve this question
Your question lacks some information. What is your linux distribution ? have you installed odbc ? from a package system ? what are your ./configure options ? – Coren Jan 31 '12 at 13:22
Yes I have installed unixodbc and installed freetds by following way [root@localhost]# tar xvfz freetds-0.60.tgz [root@localhost]# cd freetds-0.60 [root@localhost]# ./configure --with-tdsver=7.0 --with-unixodbc [root@localhost]# make [root@localhost]# make install [root@localhost]# make clean – Abhijeet Feb 1 '12 at 5:55
up vote 1 down vote accepted

With your rhel tag, I guess that you are using a Red Hat system.

This error message tells you that you need a file named libodbcinst.a or libodbcinst.so. FreeTDS needs to link to it in order to work properly.

On Red Hat System, pbone says that you need to install unixODBC-devel via your package system, if you want to pursue your manual installation. But you can also use the already packaged FreeTDS, which seems available for RHEL 5 & 6.

share|improve this answer
Ok thank you I will try it. – Abhijeet Feb 1 '12 at 5:57
Finally connected to sql server. problem in my configuration files. I solved by putting proper values. Thanks for supporting – Abhijeet Feb 2 '12 at 9:48
@Abhijeet : you're welcome. Can you check this question as answered, plz ? – Coren Feb 2 '12 at 10:08

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.