无法让 ODBC 在 MacOS X 10.7 Lion 上与 PostgreSQL 配合使用
我安装了 PostgreSQL 9.1(来自官方发行版,不是内置版本)并与 MacOS Lion 中的浏览器很好地交互。但是我无法让它与 ODBC 一起使用。我安装了 XCode 以获得所需的 libltdl.3.dylib 以及 psqlODBC 驱动程序。然后我在 /usr/lib/libltdl.3.dylib 中创建了一个符号链接,以便 psqlODBC 能够找到该库。 psqlODBC 注册在 iodbcinst.ini 中。但是,当我尝试打开连接时,出现两个不同的错误。在 iodbctest 中:
1: SQLDriverConnect = [iODBC][Driver Manager]dlopen({/Library/PostgreSQL/psqlODBC/lib/psqlodbcw.so}, 6): image not found (0) SQLSTATE=00000
2: SQLDriverConnect = [iODBC][Driver Manager]Specified driver could not be loaded (0) SQLSTATE=IM003
并通过应用程序:
[iODBC][Driver Manager]dlopen(/Library/PostgreSQL/psqlODBC/lib/psqlodbcw.so, 6): Library not loaded: /usr/lib/libltdl.3.dylib
Referenced from: /Library/PostgreSQL/psqlODBC/lib/psqlodbcw.so
Reason: no suitable image found. Did find:
/usr/lib/libltdl.
两个错误都令人费解。 psqlodbcw.so 正是它应该在的位置,libltdl.3.dylib 也是如此。驱动程序似乎在第一个周期截断了库的文件名,非常奇怪。 有什么想法吗?
I got PostgreSQL 9.1 (from the official distro, not the built-in version) to install and talk nicely to a browser in MacOS Lion. However I can't get it to work with ODBC. I installed XCode in order to have the required libltdl.3.dylib, and also the psqlODBC driver. I then made a symlink in /usr/lib/libltdl.3.dylib so that psqlODBC would find the library. psqlODBC is registered in iodbcinst.ini. However, when I try to open a connection, I get two different errors. In iodbctest:
1: SQLDriverConnect = [iODBC][Driver Manager]dlopen({/Library/PostgreSQL/psqlODBC/lib/psqlodbcw.so}, 6): image not found (0) SQLSTATE=00000
2: SQLDriverConnect = [iODBC][Driver Manager]Specified driver could not be loaded (0) SQLSTATE=IM003
And through an application:
[iODBC][Driver Manager]dlopen(/Library/PostgreSQL/psqlODBC/lib/psqlodbcw.so, 6): Library not loaded: /usr/lib/libltdl.3.dylib
Referenced from: /Library/PostgreSQL/psqlODBC/lib/psqlodbcw.so
Reason: no suitable image found. Did find:
/usr/lib/libltdl.
Both errors are puzzling. psqlodbcw.so is exactly where it's supposed to be, and so is libltdl.3.dylib. It seems the driver is truncating the library's filename at the first period, very odd.
Any thoughts?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论