我在ubuntu中安装了SQLserver。但是,当我安装sqlserver-tool时,发生了一些事情。 键入
sudo apt-get install unixodbc-dev
返回
eading package lists... Done
Building dependency tree
Reading state information... Done
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:
unixodbc-dev : Depends: unixodbc (= 2.3.7)
Depends: odbcinst1debian2 (= 2.3.7) but 2.3.6-0.1build1 is to be installed
E: Unable to correct problems, you have held broken packages.
以便我在下面尝试
sudo apt-get install unixodbc
返回
Reading package lists... Done
Building dependency tree
Reading state information... Done
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:
unixodbc : Depends: odbcinst1debian2 (>= 2.3.7) but 2.3.6-0.1build1 is to be installed
Depends: libodbc1 (>= 2.3.7) but 2.3.6-0.1build1 is to be installed
E: Unable to correct problems, you have held broken packages.
最后
sudo apt-get install odbcinst1debian2
返回
eading package lists... Done
Building dependency tree
Reading state information... Done
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:
odbcinst1debian2 : PreDepends: multiarch-support but it is not installable
E: Unable to correct problems, you have held broken packages.
我完全堆砌了,一点也不知道。 剂量任何人都可以为我提供帮助。谢谢。
答案 0 :(得分:2)
此问题似乎是您在安装sudo apt-get
之前忘记运行odbcinst1debian2
更新。在 focus 上,此软件包does not depend在multiarch-support
上。
答案 1 :(得分:2)
用户 Jiří Chmiel 的回答很有帮助,但我将两行更改为:
sudo mv /etc/apt/sources.list.d/msprod.list ~/
和:
sudo mv ~/msprod.list /etc/apt/sources.list.d/
对我有用 (20 年 12 月的 Ubuntu 20.04)
答案 2 :(得分:0)
用户rim96拥有权利,原因是Microsoft的源列表包括依赖多体系结构的更高版本(2.3.7)中的unixodbc(与Ubuntu 2.3.6版本不同) 我认为unixodbc 2.3.6足够好。就我而言,以下步骤对我有所帮助。
删除Microsoft的源列表。
both
更新源
mv /etc/apt/sources.list.d/mssql-tools.list ~/
从Ubuntu存储库安装unixodbc 2.3.6
sudo apt-get update
将Microsoft的源代码列表移回
sudo apt-get install unixodbc
再次更新源
mv ~/mssql-tools.list /etc/apt/sources.list.d/
从Microsoft的存储库中安装mssq-tools(或所需的任何工具)
sudo apt-get update