19.10:未满足的依赖项阻止安装 SQL Server 命令行工具

19.10:未满足的依赖项阻止安装 SQL Server 命令行工具

我正在尝试在 Ubuntu 19.10 中安装 SQL Server Developer Edition。

我已经关注了这篇文章(https://docs.microsoft.com/en-us/sql/linux/quickstart-install-connect-ubuntu?view=sql-server-ver15) 了解安装步骤。除 unixodbc-dev 外,所有命令均可在终端中运行。

我在终端遇到的问题如下:

sudo apt-get install libodbc1 unixodbc msodbcsql mssql-tools unixodbc-dev
Reading package lists... Done
Building dependency tree       
Reading state information... Done
mssql-tools is already the newest version (17.5.1.1-1).
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:
 libodbc1 : PreDepends: multiarch-support but it is not installable
 msodbcsql : Depends: libcurl3 but it is not installable
 unixodbc : Depends: odbcinst1debian2 (>= 2.3.7) but it is not going to be installed
 unixodbc-dev : Depends: odbcinst1debian2 (= 2.3.7) but it is not going to be installed
E: Unable to correct problems, you have held broken packages.

我还尝试按照 StackOverflow 帖子中提到的方法进行修复无法连接 Microsoft SQL-Server 和 Visual Studio 代码

但这没有帮助。

答案1

这是我修复它的方法!您只需要为 32 位应用程序安装多架构支持。显然它尚未包含在 ubuntu 19 的默认安装中。

https://www.ubuntuupdates.org/package/core/disco/main/base/multiarch-support

wget http://security.ubuntu.com/ubuntu/pool/main/g/glibc/multiarch-support_2.29-0ubuntu2_amd64.deb
sudo apt-get install ./multiarch-support_2.29-0ubuntu2_amd64.deb
sudo apt-get update
sudo apt-get install mssql-tools unixodbc-dev -f

相关内容