为了在 Linux 上使用 SQL Server 2017(DISTRIB_DESCRIPTION="Linux Mint 18.2 Sonya"),我必须使用以下行安装 unixODBC:
sudo apt-get install -y mssql-tools unixodbc-dev
但我收到以下回复:
Reading package lists ... Done
Building the dependency tree
Reading status information ... Done
Some packages can not be installed. This can mean
that you asked for the impossible, or, if you use
the unstable distribution, that some packages have not yet
were created or did not come out of Incoming.
The following information should help you resolve the situation:
The following packages contain unmet dependencies:
mssql-tools: Depends: msodbcsql17 (> = 17.3.0.0) but will not be installed
Depends: msodbcsql17 (<17.4.0.0) but will not be installed
unixodbc-dev: Depends on: unixodbc (= 2.3.7)
Depends: odbcinst1debian2 (= 2.3.7) but 2.3.1-4.1 should be installed
E: Unable to fix problems, faulty packages are in "keep as is" mode.
答案1
我认为它是一棵依赖树。
- mssql-tools 需要 msodbcsql17
- msodbcsql17 需要 unixodbc
- unixodbc 需要 libodbc1
对我来说,安装libodbc1
解决了这个问题。
sudo apt install libodbc1