Ubuntu 18.04和msodbcsql17:无法打开lib-我应该提交错误报告吗? [英] Ubuntu 18.04 and msodbcsql17: Can't open lib - SHOULD I FILE A BUG REPORT?

查看:474
本文介绍了Ubuntu 18.04和msodbcsql17:无法打开lib-我应该提交错误报告吗?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

伙计们,我已经安装了msodbcsql软件包至少几十次.从来没有出现过这个问题.甚至昨天都花了整整一天的时间来解决这个问题.

Folks, I have installed the msodbcsql package at least several dozen times. Never had this issue come up. Even spent the entire day yesterday trying to fix this.

第1步:添加apt密钥并回购到sourced.list.d 步骤2:apt-get安装msodbcsql17,mssql-tools,php odbc_pdo扩展等 第3步:创建一个非常基本的test.php(在所有其他现有的较旧服务器上运行),以测试连接到我的mssql数据库.

Step 1: add the apt key and repo to sourced.list.d Step 2: apt-get install the msodbcsql17, mssql-tools, php odbc_pdo extensions, etc Step 3: create a very basic test.php that (on all other existing older servers WORKS) makes a test connection to my mssql db.

失败:

SQLSTATE[01000] SQLDriverConnect: 0 [unixODBC][Driver Manager]Can't open lib '/opt/microsoft/msodbcsql17/lib64/libmsodbcsql-17.3.so.1.1' : file not found

是的,该文件存在.

我已尝试将chmod 755应用于该文件,但仍然说该文件不存在.

I have tried chmod 755 to the file, still says it does not exist.

我对文件做了一个小记录,这是输出:

I have done a ldd against the file, here is the output:

    linux-vdso.so.1 (0x00007ffe13bf8000)
libdl.so.2 => /lib/x86_64-linux-gnu/libdl.so.2 (0x00007fc1e865a000)
librt.so.1 => /lib/x86_64-linux-gnu/librt.so.1 (0x00007fc1e8452000)
libodbcinst.so.2 => /usr/lib/x86_64-linux-gnu/libodbcinst.so.2 (0x00007fc1e823d000)
libcrypto.so.1.0.2 => not found
libkrb5.so.3 => /usr/lib/x86_64-linux-gnu/libkrb5.so.3 (0x00007fc1e7f67000)
libgssapi_krb5.so.2 => /usr/lib/x86_64-linux-gnu/libgssapi_krb5.so.2 (0x00007fc1e7d1c000)
libssl.so.1.0.2 => not found
libuuid.so.1 => /lib/x86_64-linux-gnu/libuuid.so.1 (0x00007fc1e7b15000)
libstdc++.so.6 => /usr/lib/x86_64-linux-gnu/libstdc++.so.6 (0x00007fc1e778c000)
libm.so.6 => /lib/x86_64-linux-gnu/libm.so.6 (0x00007fc1e73ee000)
libgcc_s.so.1 => /lib/x86_64-linux-gnu/libgcc_s.so.1 (0x00007fc1e71d6000)
libpthread.so.0 => /lib/x86_64-linux-gnu/libpthread.so.0 (0x00007fc1e6fb7000)
libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x00007fc1e6bc6000)
/lib64/ld-linux-x86-64.so.2 (0x00007fc1e8c65000)
libltdl.so.7 => /usr/lib/x86_64-linux-gnu/libltdl.so.7 (0x00007fc1e69bc000)
libk5crypto.so.3 => /usr/lib/x86_64-linux-gnu/libk5crypto.so.3 (0x00007fc1e678a000)
libcom_err.so.2 => /lib/x86_64-linux-gnu/libcom_err.so.2 (0x00007fc1e6586000)
libkrb5support.so.0 => /usr/lib/x86_64-linux-gnu/libkrb5support.so.0 (0x00007fc1e637b000)
libkeyutils.so.1 => /lib/x86_64-linux-gnu/libkeyutils.so.1 (0x00007fc1e6177000)
libresolv.so.2 => /lib/x86_64-linux-gnu/libresolv.so.2 (0x00007fc1e5f5c000)

似乎缺少两个库.我发现我有libssl1.1和1.0.0.我尝试过创建libssl共享对象的1.1和1.0.0版本的符号链接.仍然会出现相同的错误.

Two libraries seem to be missing. I found I have libssl1.1 and 1.0.0. I have tried creating symlinks to BOTH the 1.1 and 1.0.0 versions of the libssl shared objects. Still get the same error.

还是,是的-我已复制/粘贴了错误提示的确切路径.路径正确.

Again, YES - I have copied/pasted the exact path the error screams about. The path is correct.

我也尝试过使用isql命令行-完全相同的错误.因此,对于odbc<-> msodbcsql库,这当然是有用的.这不是特定于PHP/PDO/ODBC的东西.

I have tried using isql command line as well - same exact error. So this is certainly something with the odbc<->msodbcsql library. This is NOT specific to the PHP/PDO/ODBC stuff.

有趣的是,mssql-cli命令行工具(来自Microsoft存储库)可以正常工作.对它运行ldd表示它不是动态可执行文件.

Interestingly, the mssql-cli command line tool (from the Microsoft repo) DOES work. Running ldd against it says it is NOT a dynamic executable.

涉及的所有库的安装版本:

Installed versions of all libraries involved:

unixodbc = 2.3.7
libodbc1 = 2.3.7
odbcinst = 2.3.7
msodbcsql = 17.3.1.1-1

所有版本都是Microsoft存储库中提供的最新版本.全部在Ubuntu 18.04下.我只是在笔记本电脑上重试了该过程(无数次)-同样的结果.抱怨没有找到驱动程序库.

All versions are the latest available from Microsoft repo. All under Ubuntu 18.04. I just re-tried the procedure (I have done countless times) on my laptop - same result. Complaining that the driver library is not found.

odbcinst -j的输出如下:

Output of odbcinst -j is as follows:

unixODBC 2.3.7
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

是的,这些文件位于/etc/odbcinst.ini和/etc/odb.ini.

Yes, the files exist at /etc/odbcinst.ini and /etc/odb.ini.

/etc/odbcinst.ini的内容:

Contents of /etc/odbcinst.ini:

[ODBC Driver 17 for SQL Server]
Description=Microsoft ODBC Driver 17 for SQL Server
Driver=/opt/microsoft/msodbcsql17/lib64/libmsodbcsql-17.3.so.1.1
UsageCount=1

运行"stat/opt/microsoft/msodbcsql17/lib64/libmsodbcsql-17.3.so.1.1":

Running "stat /opt/microsoft/msodbcsql17/lib64/libmsodbcsql-17.3.so.1.1":

Size: 2046672       Blocks: 4000       IO Block: 4096   regular file

我发现有关此问题的信息很少.我遇到的几则帖子没有解决问题,或者没有得到答复.

I have found very little info regarding this issue. The few posts I have came across either did NOT solve the issue, or have NOT been answered.

...我在这里想念什么吗?还是应该提交错误报告?

So.. am I missing something here? Or should I file a bug report?

另一方面,自第一天起,我对Ubuntu 18.04和msodbc的问题一无所获.最初,存在libcurl3/4问题.我想现在已经解决了.但这似乎是...一个错误?

On a side note, I have had nothing but issues with Ubuntu 18.04 and the msodbc stuff since day one. Originally, there was the libcurl3/4 issue. I suppose that has been fixed now. But seems this may be... a bug?

推荐答案

我今天遇到了完全相同的问题. apt-get -y install libssl1.0.0解决了我的问题.

I ran into the exact same problem today. apt-get -y install libssl1.0.0 solved the problem in my case.

这篇关于Ubuntu 18.04和msodbcsql17:无法打开lib-我应该提交错误报告吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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