ric*_*ley 10 package-management apt dependencies
我正在尝试在 Ubuntu 20.04 上安装 odbcinst1debian2,但似乎缺少依赖项“multiarch-support”:
$ sudo apt-get install odbcinst1debian2
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:
odbcinst1debian2 : PreDepends: multiarch-support but it is not installable
E: Unable to correct problems, you have held broken packages.
Run Code Online (Sandbox Code Playgroud)
sudo apt-get install -f之后运行并不能解决问题。
$ sudo apt-get install -f
Reading package lists... Done
Building dependency tree
Reading state information... Done
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
Run Code Online (Sandbox Code Playgroud)
由于这个包需要 multiarch-support,我尝试直接安装它,这也没有帮助:
$ sudo apt-get install multiarch-support
Reading package lists... Done
Building dependency tree
Reading state information... Done
Package multiarch-support is not available, but is referred to by another package.
This may mean that the package is missing, has been obsoleted, or
is only available from another source
E: Package 'multiarch-support' has no installation candidate
Run Code Online (Sandbox Code Playgroud)
这个包和依赖它的unixodbc-dev应该如何安装?
$ sudo apt-get install unixodbc-dev
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-dev : Depends: unixodbc (= 2.3.7)
Depends: odbcinst1debian2 (= 2.3.7) but it is not going to be installed
E: Unable to correct problems, you have held broken packages.
Run Code Online (Sandbox Code Playgroud)
任何帮助将不胜感激,谢谢。
我已经运行了apt-get update,这是我在新安装上运行的第一件事。
$ sudo apt-get install odbcinst1debian2
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.
[Stuff deleted]
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.
$ lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description: Ubuntu 20.04 LTS
Release: 20.04 Codename: focal
$ apt-cache policy odbcinst1debian2
odbcinst1debian2:
Installed: (none)
Candidate: 2.3.7
Version table:
2.3.7 500
500 https://packages.microsoft.com/ubuntu/18.04/prod bionic/main amd64 Packages
2.3.6-0.1build1 500
500 http://hk.archive.ubuntu.com/ubuntu focal/main amd64 Packages
Run Code Online (Sandbox Code Playgroud)
N0r*_*ert 10
这个问题看起来你sudo apt-get update在安装之前忘记运行了odbcinst1debian2。在焦点上,此包不依赖于multiarch-support.
顺便multiarch-support可以手动安装:
cd ~/Downloads
wget http://archive.ubuntu.com/ubuntu/pool/main/g/glibc/multiarch-support_2.27-3ubuntu1.4_amd64.deb
sudo apt-get install ./multiarch-support_2.27-3ubuntu1.4_amd64.deb
Run Code Online (Sandbox Code Playgroud)
正如评论和其他答案中所解释的,该问题来自微软广告更新版本的软件包。
\n但是,您可以保留 Microsoft 存储库并在 \xc2\xa0 中为其设置较低优先级的策略/etc/apt/preferences:
Package: *\nPin: origin "packages.microsoft.com"\nPin-Priority: 1\nRun Code Online (Sandbox Code Playgroud)\n然后使用apt-get update并重试升级。
| 归档时间: |
|
| 查看次数: |
9079 次 |
| 最近记录: |