赞
踩
[Microsoft][ODBC Driver 17 for SQL Server]SSL Provider: [OpenSSL library could not be loaded, make sure OpenSSL 1.0 or 1.1 is installed]
- [
- {
- "0": "08001",
- "SQLSTATE": "08001",
- "1": -1,
- "code": -1,
- "2": "[Microsoft][ODBC Driver 17 for SQL Server]SSL Provider: [OpenSSL library could not be loaded, make sure OpenSSL 1.0 or 1.1 is installed]",
- "message": "[Microsoft][ODBC Driver 17 for SQL Server]SSL Provider: [OpenSSL library could not be loaded, make sure OpenSSL 1.0 or 1.1 is installed]"
- },
- {
- "0": "08001",
- "SQLSTATE": "08001",
- "1": -1,
- "code": -1,
- "2": "[Microsoft][ODBC Driver 17 for SQL Server]Client unable to establish connection",
- "message": "[Microsoft][ODBC Driver 17 for SQL Server]Client unable to establish connection"
- }
- ]
意思是 ODBC Driver 17 需要 OpenSSL 1.0 or 1.1版本,可能是你没有安装或者安装了其他版本的 openssl 可以通过如下命令查看版本:
openssl version
如果你是3.0版本,建议用ODBC Driver 18来连接,先安装 ODBC Driver 18
- ## 先查询 odbcinst.ini 配置文件路径
- find / -name 'odbcinst.ini'
-
- ## 再修改配置,比如我的路径
- vim /usr/local/etc/odbcinst.ini
-
把ODBC Driver 17 的配置删掉或注释掉,保存退出生效。
- #[ODBC Driver 17 for SQL Server]
- #Description=Microsoft ODBC Driver 17 for SQL Server
- #Driver=/usr/local/lib/libmsodbcsql.17.dylib
- #UsageCount=5
-
- [ODBC Driver 18 for SQL Server]
- Description=Microsoft ODBC Driver 18 for SQL Server
- Driver=/usr/local/lib/libmsodbcsql.18.dylib
- UsageCount=3
此方法慎用,可能其他软件有依赖这个插件,这里我不写具体的方法了,已经被坑过了。
Copyright © 2003-2013 www.wpsshop.cn 版权所有,并保留所有权利。