1、先下载unixODBC源码包( http://www.unixodbc.org/unixODBC-2.3.1.tar.gz)放到/usr/local下
解压:
tar -zxvf unixODBC-2.3.1.tar.gz
2、安装unixODBC-2.3.1.tar.gz
#cd usr/local/unixODBC-2.3.1/
#./configure --prefix=/usr/local/unixODBC-2.3.1 --includedir=/usr/include --libdir=/usr/lib -bindir=/usr/bin --sysconfdir=/etc
#make
#make install
3、测试查看unixODBC安装情况
#odbcinst -j
unixODBC 2.3.1
DRIVERS............: /etc/odbcinst.ini
SYSTEM DATA SOURCES: /etc/odbc.ini
FILE DATA SOURCES..: /etc/ODBCDataSources
USER DATA SOURCES..: /root/.odbc.ini
SQLULEN Size.......: 8
SQLLEN Size........: 8
SQLSETPOSIROW Size.: 8
PS:安装完成后,查看unixODBC安装情况,可能会报如下错误:
#odbcinst -j
odbcinst: error while loading shared libraries: libodbcinst.so.2: cannot open shared object file: No suc