freetds-dev中缺少libtdsodbc.so-Ubuntu上的MSSQL [英] Missing libtdsodbc.so in freetds-dev - MSSQL on Ubuntu

查看:228
本文介绍了freetds-dev中缺少libtdsodbc.so-Ubuntu上的MSSQL的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试通过ODBC在Ubuntu 12.04上使用MSSQL,并且按照以下步骤操作:

I'm trying to get MSSQL working on Ubuntu 12.04 via ODBC, and I've followed these steps to the letter:

http://jamesrossiter.wordpress.com/2011/03/08/connecting-to-microsoft-sql-server-using-odbc-from-ubuntu-server/

但是,这忽略了odbcinst.ini中指向的两个文件:

However, this omits both of these files that are pointed at in odbcinst.ini:

Driver = /usr/lib/odbc/libtdsodbc.so
Setup = /usr/lib/odbc/libtdsS.so

因此,我在Google上搜索了一下,发现了这一点:

So, I googled a bit and found this:

http://ubuntuforums.org/showthread.php?t=433435& page = 2

因此,我按照这些说明进行操作,并将libtdsodbc.so放在/usr/lib/odbc/中,但是仍然出现此错误:

So I followed those instructions and put libtdsodbc.so in /usr/lib/odbc/, but I still get this error:

Can't open lib '/usr/lib/odbc/libtdsodbc.so' : file not found, SQL state 01000 in SQLConnect

但是...

root@ubuntu:/usr/lib/odbc# ls -la
total 552
drwxr-xr-x  2 root root   4096 Aug 19 20:12 .
drwxr-xr-x 62 root root  12288 Aug 19 19:41 ..
-rwxrwxr-x  1 root root 270608 Aug 19 20:00 libtdsodbc.so

我在该文件上尝试了chmod 775,该文件解释了权限.还是没有运气.

I tried chmod 775 on that file, which explains the permissions. Still no luck.

有什么想法吗?我很困惑真的很想在我的Linux机器上使用它.

Any ideas? I'm stumped. Would really love to get this working on my Linux box.

我正在使用Ubuntu 64位.我敢打赌这是问题所在.希望对您有帮助...

I'm using Ubuntu 64-bit. I'm betting this is the problem. Hope that helps...

我尝试从此处手动获取64位软件包:

I tried manually getting the 64-bit package from here:

http://www.ubuntuupdates.org/package/core/精确/主/基本/tdsodbc

然后我看到有一个名为以下文件:

And then I saw there was a file called this:

/usr/lib/x86_64-linux-gnu/odbc/libtdsodbc.so

哦,也许是64位版本,对吧?

Woo, maybe a 64-bit version, right?

所以我把odbcinst.ini指向了它,但是它没有用.

So I pointed odbcinst.ini at it, and it didn't work.

推荐答案

我最终在以下listserv帖子的帮助下解决了该问题:

I ended up solving it with the help of this listserv post:

http://mailman.unixodbc.org/pipermail/unixodbc-support/2008-November/001842.html

除了:

Driver = TDS

应该是:

Driver = FreeTDS

我必须手动找到的那个奇怪的64位驱动程序也很重要,而忽略freetds.conf是解决之道.

That weird 64-bit driver I had to manually find was also relevant, and ignoring freetds.conf was the way to go.

好玩的东西.

这篇关于freetds-dev中缺少libtdsodbc.so-Ubuntu上的MSSQL的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆