[英]Unable install SQLserver tool in ubuntu 20
我在 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.
我完全堆疊,完全不知道。 劑量任何人都可以幫助我。 謝謝。
用戶 rim96 是對的,原因是微軟的源碼列表中包含了依賴多架構的更高版本(2.3.7)的 unixodbc(與 Ubuntu 的 2.3.6 版本不同)我認為 unixodbc 2.3.6 已經足夠好了。 就我而言,以下步驟對我有所幫助。
刪除 Microsoft 的源列表。
mv /etc/apt/sources.list.d/mssql-tools.list ~/
更新來源
sudo apt-get update
從 Ubuntu 存儲庫安裝 unixodbc 2.3.6
sudo apt-get install unixodbc
將微軟的源列表移回
mv ~/mssql-tools.list /etc/apt/sources.list.d/
再次更新來源
sudo apt-get update
從 Microsoft 的存儲庫安裝 mssq-tools(或任何你想要的)
sudo apt-get install mssql-tools
這個問題看起來像您在安裝odbcinst1debian2
之前忘記運行sudo apt-get
update 。 在焦點上,這個 package不依賴於multiarch-support
。
用戶 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)
如果您遵循Microsoft 安裝指南 SQL Server Tools ,對於 Ubuntu 它說
如果您使用的是 Ubuntu 18.04 或 Ubuntu 20.04,請將下面步驟 2 中的存儲庫路徑從 /ubuntu/16.04 更改為 /ubuntu/18.04 或 /ubuntu/20000。
所以在第2步,你應該做
curl https://packages.microsoft.com/config/ubuntu/20.04/prod.list | sudo tee /etc/apt/sources.list.d/msprod.list
代替
curl https://packages.microsoft.com/config/ubuntu/16.04/prod.list | sudo tee /etc/apt/sources.list.d/msprod.list
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.