unixodbc 和 netezza ODBC 驱动程序问题(未定义符号:SSL_connect)

发布于 2024-12-02 14:00:38 字数 1155 浏览 1 评论 0原文

我正在尝试设置 unixODBC 以连接到 Netezza 数据库,但是当我尝试使用 isql 进行连接时,出现“未定义符号:SSL_connect”。

当前使用:CentOS 5.5,unixODBC 2.3.0(与2.2.11相同的问题)。

我已完成以下操作:

  • 根据 ODBC 驱动程序附带的 README.txt 配置 LD_LIBRARY_PATH、ODBCINI 和 NZ_INI_FILE_PATH。
  • 随后使用 ldd 命令加载所有库并为 libssl 和 libcrypto 设置符号链接。
  • 更新了 /etc/ld.so.conf 文件以确保加载 netezza 驱动程序路径。
  • 使用 nm 确认 SSL_connect 符号位于驱动程序中。

针对此符号的文件运行 dltest 会报告“找不到文件”错误,这是我尝试运行 isql -v 时通常会遇到的错误,但是我更改了 LD_DEBUG 环境变量以获取其他调试信息,这导致我进入 SSL_connect 。

(仅供参考,export LD_DEBUG=files isql sospos 是我使用的。)

有什么想法吗?这让我发疯,因为看起来一切都在那里,但它仍然不起作用。最糟糕的是,我几个月前在 Ubuntu 10.10 上设置了同样的东西,它运行时没有任何问题。

更新:

首先,libnzodbc.so 文件上的 ldd 看起来不错。所有依赖关系均已得到满足。

其次,我在文件中看到的唯一缺少的东西是 en_US 语言环境的 libc.mo 文件,因此我设置了一个指向 en_GB 语言环境的符号链接。不幸的是,它仍然抛出相同的错误,即使它看起来找到了它正在寻找的所有其他库。我应该在 strace 输出中寻找其他内容吗?

更新 2:

我当前看到的一个问题是 isql 正在 ISO8859-1.so 中查找 gconv_end,但是该符号不存在。有趣的是,该符号在我的 Ubuntu 服务器虚拟机上不存在,并且 isql 工作正常。我上面指定的两个版本的 unixODBC 都有相同的问题。

更新 3:

好的,使用 -d 和 -r 选项重新运行 ldd,是的,仍然存在问题。每个 SSL* 符号均丢失。我猜这意味着我创建了指向错误文件的符号链接。有人知道哪个 ssl 库文件包含 SSL_connect 吗?

I'm trying to set up unixODBC to connect to a Netezza database, however I'm getting a "Undefined symbol: SSL_connect" when I try to connect using isql.

Currently using: CentOS 5.5, unixODBC 2.3.0 (Same issue with 2.2.11).

I have done the following:

  • Configured the LD_LIBRARY_PATH, ODBCINI, and NZ_INI_FILE_PATH according to the README.txt that came with the ODBC drivers.
  • Ensued that all libraries are loaded by using the ldd command and setting up symbolic links for libssl and libcrypto.
  • Updated the /etc/ld.so.conf file to ensure the netezza drivers path is loaded.
  • Used nm to confirm that the SSL_connect symbol is in the driver.

Running dltest against the file for this symbol reports a "file not found" error, which is what I normally get when I try to run isql -v, however I changed the LD_DEBUG environment variable to get additional debugging info, which led me to SSL_connect.

(FYI, export LD_DEBUG=files isql sospos is what I used.)

Any thoughts? This is driving my crazy as it appears everything is there, but it's still not working. Worst part is that I set up the same thing on Ubuntu 10.10 months ago and it worked without any issues.

UPDATE:

First, ldd on the libnzodbc.so file looks good. All dependencies have been satisfied.

Second, the only thing I could see in the file that was missing was the libc.mo file for the en_US locale, so I set up a symbolic link to the en_GB one. Unfortunately, it's still throwing the same error even though it it looks like it found every other lib it's looking for. Is there anything else in the strace output I should be looking for?

UPDATE 2:

An issue I'm currently seeing is that isql is looking for gconv_end in ISO8859-1.so, however that symbol does not exist. Interestingly enough, the symbol does not exist on my Ubuntu server VM and isql works fine. Both versions of unixODBC I specified above have the same issue.

UPDATE 3:

O.K. Re-ran ldd with the -d and -r options and yes, there are still issues. Every SSL* symbol is missing. I'm guessing this means that I created a symbolic link to the wrong file. Anyone know which ssl library file contains SSL_connect?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(3

错々过的事 2024-12-09 14:00:38

好的 弄清楚了。事实证明我创建的符号链接指向错误的库文件。最初我是这样做的:

(/usr/lib/) ln -s libssl3.so libssl.so.4

我应该这样做:

(/usr/lib) ln -s ../../lib/libssl.so.0.9.8e libssl.so.4

O.K. Figured it out. It turns out the symbolic link I created was pointing to the wrong library file. Originally I did this:

(/usr/lib/) ln -s libssl3.so libssl.so.4

I should have done this:

(/usr/lib) ln -s ../../lib/libssl.so.0.9.8e libssl.so.4
终难遇 2024-12-09 14:00:38

嗯,SSL_connect 来自 OpenSSL 库。也许您可以尝试在 isql 上使用 strace 并发布加载 libssl 失败的部分(我怀疑)。您现有的 ssl 库可能与驱动程序正在寻找的内容不匹配。 ldd 在驱动程序库上显示什么?

Well, SSL_connect is from the OpenSSL libs. Maybe you could try using strace on isql and post the parts where it fails (I suspect) to load a libssl. It may be that your existing ssl lib doesn't match what the driver is looking for. What does ldd show on the driver lib?

甚是思念 2024-12-09 14:00:38

如果有人仍在寻找类似的问题,有一个效果很好的 django-netezza 包: https://github .com/msabramo/django-netezza

If anyone is still looking at a similar issue, there's a django-netezza package that works well: https://github.com/msabramo/django-netezza

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文