使用适用于 Linux 的 ODBC MySQL 驱动程序时找不到驱动程序

问题描述 投票:0回答:1

使用 Tableau Server 的 Ubuntu 22.04 上的 MySQL ODBC 驱动程序存在问题。 尝试连接导致错误:

[unixODBC][Driver Manager]Can't open lib '/usr/lib/x86_64-linux-gnu/odbc/libmyodbc8w.so' : file not found

但是文件存在:

    tableau@tableau:/tmp$ namei /usr/lib/x86_64-linux-gnu/odbc/libmyodbc8w.so
    f: /usr/lib/x86_64-linux-gnu/odbc/libmyodbc8w.so
     d /
     d usr
     d lib
     d x86_64-linux-gnu
     d odbc
     - libmyodbc8w.so

最初系统安装在 AL2 上,使用 ODBC Mysql Driver 5.x.x。 Ofc 它需要迁移。被选为Ubuntu 22.04 LTS。最初使用的驱动程序是8.2.x.

在 Tableau 开发人员的“帮助”后,它已降级至 8.0.x。

错误仍然存在。在软件中,驱动程序标注似乎没有深度调试。问题一定出在它身上,因为没有尝试连接(根据转储)。

当前配置:

tableau@tableau:/tmp# cat /etc/odbc.ini 

[tableau]
Driver = /usr/lib/x86_64-linux-gnu/odbc/libmyodbc8w.so
Description = ODBC for MySQL
SERVER = <my_server_replaced>
PORT = <my_port_replaced>
Database = <my_db_replaced>
USER = <my_user_replaced>
Password = <my_pwd_replaced>
tableau@tableau:/tmp# cat /etc/odbcinst.ini 
[MySQL ODBC 8.0 Unicode Driver]
Driver=/usr/lib/x86_64-linux-gnu/odbc/libmyodbc8w.so
SETUP=/usr/lib/x86_64-linux-gnu/odbc/libmyodbc8S.so
UsageCount=1

[MySQL ODBC 8.0 ANSI Driver]
Driver=/usr/lib/x86_64-linux-gnu/odbc/libmyodbc8a.so
SETUP=/usr/lib/x86_64-linux-gnu/odbc/libmyodbc8S.so
UsageCount=1

现任司机:

tableau@tableau# apt info -a mysql-connector-odbc
Package: mysql-connector-odbc
Version: 8.0.33-1ubuntu22.04
Status: install ok installed
Priority: optional
Section: libs
Maintainer: Oracle MySQL Product Engineering Team <[email protected]>
Installed-Size: 23.4 MB
Depends: dpkg-dev, mysql-community-client-plugins, debconf (>= 0.5) | debconf-2.0, libc6 (>= 2.34), libgcc-s1 (>= 3.0), libodbc2 (>= 2.3.1), libodbcinst2 (>= 2.3.1), libssl3 (>= 3.0.0~~alpha1), libstdc++6 (>= 11)
Conflicts: mysql-connector-odbc-commercial
Homepage: http://dev.mysql.com/downloads/connector/odbc/
Download-Size: unknown
APT-Manual-Installed: yes
APT-Sources: /var/lib/dpkg/status
Description: MySQL ODBC driver
 This package allows you to connect to MySQL database servers using
 ODBC, the Open Database Connectivity abstraction layer which is
 understood by a variety of database tools that cannot talk to MySQL
 databases directly.

部门没有问题:

tableau@tableau:/tmp$ ldd -v /usr/lib/x86_64-linux-gnu/odbc/libmyodbc8w.so
    linux-vdso.so.1 (0x00007ffee2b70000)
    libssl.so.3 => /lib/x86_64-linux-gnu/libssl.so.3 (0x000073b38da27000)
    libcrypto.so.3 => /lib/x86_64-linux-gnu/libcrypto.so.3 (0x000073b38cc00000)
    libresolv.so.2 => /lib/x86_64-linux-gnu/libresolv.so.2 (0x000073b38da13000)
    libodbcinst.so.2 => /lib/x86_64-linux-gnu/libodbcinst.so.2 (0x000073b38d9fe000)
    libstdc++.so.6 => /lib/x86_64-linux-gnu/libstdc++.so.6 (0x000073b38c800000)
    libgcc_s.so.1 => /lib/x86_64-linux-gnu/libgcc_s.so.1 (0x000073b38d1e0000)
    libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x000073b38c400000)
    /lib64/ld-linux-x86-64.so.2 (0x000073b38dad4000)
    libltdl.so.7 => /lib/x86_64-linux-gnu/libltdl.so.7 (0x000073b38d1d5000)
    libm.so.6 => /lib/x86_64-linux-gnu/libm.so.6 (0x000073b38d0ee000)

    Version information:
    /usr/lib/x86_64-linux-gnu/odbc/libmyodbc8w.so:
        libgcc_s.so.1 (GCC_3.0) => /lib/x86_64-linux-gnu/libgcc_s.so.1
        ld-linux-x86-64.so.2 (GLIBC_2.3) => /lib64/ld-linux-x86-64.so.2
        libresolv.so.2 (GLIBC_2.9) => /lib/x86_64-linux-gnu/libresolv.so.2
        libcrypto.so.3 (OPENSSL_3.0.0) => /lib/x86_64-linux-gnu/libcrypto.so.3
        libstdc++.so.6 (GLIBCXX_3.4.20) => /lib/x86_64-linux-gnu/libstdc++.so.6
        libstdc++.so.6 (CXXABI_1.3.8) => /lib/x86_64-linux-gnu/libstdc++.so.6
        libstdc++.so.6 (GLIBCXX_3.4.9) => /lib/x86_64-linux-gnu/libstdc++.so.6
        libstdc++.so.6 (CXXABI_1.3.9) => /lib/x86_64-linux-gnu/libstdc++.so.6
        libstdc++.so.6 (GLIBCXX_3.4.29) => /lib/x86_64-linux-gnu/libstdc++.so.6
        libstdc++.so.6 (GLIBCXX_3.4.18) => /lib/x86_64-linux-gnu/libstdc++.so.6
        libstdc++.so.6 (GLIBCXX_3.4.11) => /lib/x86_64-linux-gnu/libstdc++.so.6
        libstdc++.so.6 (CXXABI_1.3) => /lib/x86_64-linux-gnu/libstdc++.so.6
        libstdc++.so.6 (GLIBCXX_3.4.21) => /lib/x86_64-linux-gnu/libstdc++.so.6
        libstdc++.so.6 (CXXABI_1.3.5) => /lib/x86_64-linux-gnu/libstdc++.so.6
        libstdc++.so.6 (GLIBCXX_3.4.15) => /lib/x86_64-linux-gnu/libstdc++.so.6
        libstdc++.so.6 (GLIBCXX_3.4) => /lib/x86_64-linux-gnu/libstdc++.so.6
        libssl.so.3 (OPENSSL_3.0.0) => /lib/x86_64-linux-gnu/libssl.so.3
        libc.so.6 (GLIBC_2.28) => /lib/x86_64-linux-gnu/libc.so.6
        libc.so.6 (GLIBC_2.33) => /lib/x86_64-linux-gnu/libc.so.6
        libc.so.6 (GLIBC_2.7) => /lib/x86_64-linux-gnu/libc.so.6
        libc.so.6 (GLIBC_2.14) => /lib/x86_64-linux-gnu/libc.so.6
        libc.so.6 (GLIBC_2.3) => /lib/x86_64-linux-gnu/libc.so.6
        libc.so.6 (GLIBC_2.34) => /lib/x86_64-linux-gnu/libc.so.6
        libc.so.6 (GLIBC_2.2.5) => /lib/x86_64-linux-gnu/libc.so.6
        libc.so.6 (GLIBC_2.4) => /lib/x86_64-linux-gnu/libc.so.6
        libc.so.6 (GLIBC_2.3.4) => /lib/x86_64-linux-gnu/libc.so.6
    /lib/x86_64-linux-gnu/libssl.so.3:
        libc.so.6 (GLIBC_2.4) => /lib/x86_64-linux-gnu/libc.so.6
        libc.so.6 (GLIBC_2.14) => /lib/x86_64-linux-gnu/libc.so.6
        libc.so.6 (GLIBC_2.3.4) => /lib/x86_64-linux-gnu/libc.so.6
        libc.so.6 (GLIBC_2.2.5) => /lib/x86_64-linux-gnu/libc.so.6
        libcrypto.so.3 (OPENSSL_3.0.3) => /lib/x86_64-linux-gnu/libcrypto.so.3
        libcrypto.so.3 (OPENSSL_3.0.0) => /lib/x86_64-linux-gnu/libcrypto.so.3
    /lib/x86_64-linux-gnu/libcrypto.so.3:
        libc.so.6 (GLIBC_2.15) => /lib/x86_64-linux-gnu/libc.so.6
        libc.so.6 (GLIBC_2.14) => /lib/x86_64-linux-gnu/libc.so.6
        libc.so.6 (GLIBC_2.4) => /lib/x86_64-linux-gnu/libc.so.6
        libc.so.6 (GLIBC_2.3) => /lib/x86_64-linux-gnu/libc.so.6
        libc.so.6 (GLIBC_2.25) => /lib/x86_64-linux-gnu/libc.so.6
        libc.so.6 (GLIBC_2.33) => /lib/x86_64-linux-gnu/libc.so.6
        libc.so.6 (GLIBC_2.7) => /lib/x86_64-linux-gnu/libc.so.6
        libc.so.6 (GLIBC_2.3.4) => /lib/x86_64-linux-gnu/libc.so.6
        libc.so.6 (GLIBC_2.17) => /lib/x86_64-linux-gnu/libc.so.6
        libc.so.6 (GLIBC_2.16) => /lib/x86_64-linux-gnu/libc.so.6
        libc.so.6 (GLIBC_2.34) => /lib/x86_64-linux-gnu/libc.so.6
        libc.so.6 (GLIBC_2.2.5) => /lib/x86_64-linux-gnu/libc.so.6
    /lib/x86_64-linux-gnu/libresolv.so.2:
        libc.so.6 (GLIBC_2.14) => /lib/x86_64-linux-gnu/libc.so.6
        libc.so.6 (GLIBC_2.4) => /lib/x86_64-linux-gnu/libc.so.6
        libc.so.6 (GLIBC_2.34) => /lib/x86_64-linux-gnu/libc.so.6
        libc.so.6 (GLIBC_PRIVATE) => /lib/x86_64-linux-gnu/libc.so.6
        libc.so.6 (GLIBC_2.2.5) => /lib/x86_64-linux-gnu/libc.so.6
        libc.so.6 (GLIBC_2.3) => /lib/x86_64-linux-gnu/libc.so.6
    /lib/x86_64-linux-gnu/libodbcinst.so.2:
        libc.so.6 (GLIBC_2.14) => /lib/x86_64-linux-gnu/libc.so.6
        libc.so.6 (GLIBC_2.4) => /lib/x86_64-linux-gnu/libc.so.6
        libc.so.6 (GLIBC_2.3.4) => /lib/x86_64-linux-gnu/libc.so.6
        libc.so.6 (GLIBC_2.2.5) => /lib/x86_64-linux-gnu/libc.so.6
        libc.so.6 (GLIBC_2.3) => /lib/x86_64-linux-gnu/libc.so.6
    /lib/x86_64-linux-gnu/libstdc++.so.6:
        libm.so.6 (GLIBC_2.2.5) => /lib/x86_64-linux-gnu/libm.so.6
        ld-linux-x86-64.so.2 (GLIBC_2.3) => /lib64/ld-linux-x86-64.so.2
        libgcc_s.so.1 (GCC_4.2.0) => /lib/x86_64-linux-gnu/libgcc_s.so.1
        libgcc_s.so.1 (GCC_3.4) => /lib/x86_64-linux-gnu/libgcc_s.so.1
        libgcc_s.so.1 (GCC_3.3) => /lib/x86_64-linux-gnu/libgcc_s.so.1
        libgcc_s.so.1 (GCC_3.0) => /lib/x86_64-linux-gnu/libgcc_s.so.1
        libc.so.6 (GLIBC_2.14) => /lib/x86_64-linux-gnu/libc.so.6
        libc.so.6 (GLIBC_2.6) => /lib/x86_64-linux-gnu/libc.so.6
        libc.so.6 (GLIBC_2.33) => /lib/x86_64-linux-gnu/libc.so.6
        libc.so.6 (GLIBC_2.25) => /lib/x86_64-linux-gnu/libc.so.6
        libc.so.6 (GLIBC_2.18) => /lib/x86_64-linux-gnu/libc.so.6
        libc.so.6 (GLIBC_2.16) => /lib/x86_64-linux-gnu/libc.so.6
        libc.so.6 (GLIBC_2.32) => /lib/x86_64-linux-gnu/libc.so.6
        libc.so.6 (GLIBC_2.7) => /lib/x86_64-linux-gnu/libc.so.6
        libc.so.6 (GLIBC_2.3.4) => /lib/x86_64-linux-gnu/libc.so.6
        libc.so.6 (GLIBC_2.17) => /lib/x86_64-linux-gnu/libc.so.6
        libc.so.6 (GLIBC_2.3) => /lib/x86_64-linux-gnu/libc.so.6
        libc.so.6 (GLIBC_2.3.2) => /lib/x86_64-linux-gnu/libc.so.6
        libc.so.6 (GLIBC_2.34) => /lib/x86_64-linux-gnu/libc.so.6
        libc.so.6 (GLIBC_2.2.5) => /lib/x86_64-linux-gnu/libc.so.6
        libc.so.6 (GLIBC_2.4) => /lib/x86_64-linux-gnu/libc.so.6
    /lib/x86_64-linux-gnu/libgcc_s.so.1:
        libc.so.6 (GLIBC_2.35) => /lib/x86_64-linux-gnu/libc.so.6
        libc.so.6 (GLIBC_2.14) => /lib/x86_64-linux-gnu/libc.so.6
        libc.so.6 (GLIBC_2.34) => /lib/x86_64-linux-gnu/libc.so.6
        libc.so.6 (GLIBC_2.2.5) => /lib/x86_64-linux-gnu/libc.so.6
    /lib/x86_64-linux-gnu/libc.so.6:
        ld-linux-x86-64.so.2 (GLIBC_2.2.5) => /lib64/ld-linux-x86-64.so.2
        ld-linux-x86-64.so.2 (GLIBC_2.3) => /lib64/ld-linux-x86-64.so.2
        ld-linux-x86-64.so.2 (GLIBC_PRIVATE) => /lib64/ld-linux-x86-64.so.2
    /lib/x86_64-linux-gnu/libltdl.so.7:
        libc.so.6 (GLIBC_2.3.4) => /lib/x86_64-linux-gnu/libc.so.6
        libc.so.6 (GLIBC_2.3) => /lib/x86_64-linux-gnu/libc.so.6
        libc.so.6 (GLIBC_2.14) => /lib/x86_64-linux-gnu/libc.so.6
        libc.so.6 (GLIBC_2.4) => /lib/x86_64-linux-gnu/libc.so.6
        libc.so.6 (GLIBC_2.34) => /lib/x86_64-linux-gnu/libc.so.6
        libc.so.6 (GLIBC_2.2.5) => /lib/x86_64-linux-gnu/libc.so.6
    /lib/x86_64-linux-gnu/libm.so.6:
        ld-linux-x86-64.so.2 (GLIBC_PRIVATE) => /lib64/ld-linux-x86-64.so.2
        libc.so.6 (GLIBC_2.4) => /lib/x86_64-linux-gnu/libc.so.6
        libc.so.6 (GLIBC_2.2.5) => /lib/x86_64-linux-gnu/libc.so.6
        libc.so.6 (GLIBC_PRIVATE) => /lib/x86_64-linux-gnu/libc.so.6
tableau@tableau:/tmp$ isql -v tableau
+---------------------------------------+
| Connected!                            |
|                                       |
| sql-statement                         |
| help [tablename]                      |
| quit                                  |
|                                       |
+---------------------------------------+

应用程序装甲: 尝试完全禁用 -> 相同的结果。 日志中没有否认。 所以保持“原样”。

非常感谢任何提示或帮助!

mysql ubuntu odbc tableau-api ubuntu-22.04
1个回答
0
投票

看起来是 Tableau 服务器问题。 正如我所说,我正在运行 Ubuntu 22.04 LTS(在网站上正式标记为受支持的操作系统),并且 mysql 网站

上没有可用的预编译驱动程序 5.x

作为解决方法,我从源代码构建了驱动程序 5.3.13 并将 odbcinst.ini 设置为:

[MySQL ODBC 8.0 Unicode Driver]
Driver=/usr/local/lib/libmyodbc5w.so
UsageCount=1

所以最新的服务器会认为这是 8.x,但会使用 5.x... 是的,如果配置名称包含 5.x -> 服务器将抛出错误。 很奇怪——是的。但它正在发挥作用。开发人员通过支持票不评论此行为...

© www.soinside.com 2019 - 2024. All rights reserved.