【发布时间】:2019-03-06 10:48:13
【问题描述】:
我刚刚在我的 Ubuntu 18.10 机器上安装了适用于 linux 的 MSSQL 2017 和适用于 linux 的 Visual Studio 代码。 两者都安装成功,但我无法从 Visual Studio 连接到数据库。
我有以下正在运行的驱动程序:
$ odbcinst -j
unixODBC 2.3.7
DRIVERS............: /etc/odbcinst.ini
SYSTEM DATA SOURCES: /etc/odbc.ini
FILE DATA SOURCES..: /etc/ODBCDataSources
USER DATA SOURCES..: /home/neo4j/.odbc.ini
SQLULEN Size.......: 8
SQLLEN Size........: 8
SQLSETPOSIROW Size.: 8
但是,当我尝试安装时
$ sudo apt-get install mssql-tools unixodbc-dev
我收到以下错误:
Some packages could not be installed. This may mean that you have
requested an impossible situation or if you are using the unstable
distribution that some required packages have not yet been created
or been moved out of Incoming.
The following information may help to resolve the situation:
The following packages have unmet dependencies:
mssql-tools : Depends: msodbcsql17 (>= 17.3.0.0) but it is not going to be installed
Depends: msodbcsql17 (< 17.4.0.0) but it is not going to be installed
unixodbc-dev : Depends: unixodbc (= 2.3.7)
E: Unable to correct problems, you have held broken packages.
经过大量谷歌搜索,我发现了很多建议,但它们没有运行,例如尝试删除 msodbcsql 和 unixodbc
$ sudo apt-get remove msodbcsql
Reading package lists... Done
Building dependency tree
Reading state information... Done
Package 'msodbcsql' is not installed, so not removed
0 upgraded, 0 newly installed, 0 to remove and 1 not upgraded.
此时我已被锁定,无法继续。
有没有人正在运行的解决方案?
【问题讨论】:
-
不确定,但我认为 ODBC/ADO 需要在 wine 下运行。
-
好吧,我也不确定!所有文档实际文档从不谈论 Wine 或其他层。并且看起来他们不需要这些层。我发现了一个特定的警报:
Note At this time, the Windows Subsystem for Linux for Windows 10 is not supported as an installation target.。
标签: sql-server visual-studio-code ubuntu-18.04 sql-server-2017