You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

Ubuntu 20.04中Microsoft ODBC 17驱动安装后配置失败问题求助

Ubuntu 20.04中Microsoft ODBC 17驱动安装后配置失败问题求助

我正在Ubuntu 20.04上尝试安装Microsoft ODBC Driver 17,按照官方步骤操作,但执行下面的命令时遇到了配置失败的问题:

sudo ACCEPT_EULA=Y apt-get install -y msodbcsql17

返回的完整错误信息如下:

Reading package lists... Done
Building dependency tree
Reading state information... Done
msodbcsql17 is already the newest version (17.10.2.1-1).
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
1 not fully installed or removed.
After this operation, 0 B of additional disk space will be used.
Setting up msodbcsql17 (17.10.2.1-1) ...
odbcinst: symbol lookup error: odbcinst: undefined symbol: iniOpen
dpkg: error processing package msodbcsql17 (--configure):
installed msodbcsql17 package post-installation script subprocess returned error exit status 127
Errors were encountered while processing:
msodbcsql17
E: Sub-process /usr/bin/dpkg returned an error code (1)

我特意检查了odbcinst的状态,看起来是正常安装的:

odbcinst -j

对应的输出结果:

unixODBC 2.3.11
DRIVERS............: /usr/local/etc/odbcinst.ini
SYSTEM DATA SOURCES: /usr/local/etc/odbc.ini
FILE DATA SOURCES..: /usr/local/etc/ODBCDataSources
USER DATA SOURCES..: /home/atorres/.odbc.ini
SQLULEN Size.......: 8
SQLLEN Size........: 8
SQLSETPOSIROW Size.: 8

我已经尝试过彻底卸载并重新安装unixodbc和odbcinst,也试过执行sudo dpkg --configure -a来修复配置,但都没能解决问题。有没有大佬能帮我分析下我的系统到底哪里出问题了?

备注:内容来源于stack exchange,提问作者skd

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.04.23 11:14:52