我的 Ubuntu 18.04 仓库因“ ”错误而损坏Depends: xxx but it is not going to be installed
。进一步的调查使我相信这是由软件包版本的命名约定冲突引起的:
% apt install libqt5gui5
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:
libqt5gui5 : Depends: libxkbcommon-x11-0 (>= 0.5.0) but it is not going to be installed
E: Unable to correct problems, you have held broken packages.
% apt install libxkbcommon-x11-0
The following packages have unmet dependencies:
libxkbcommon-x11-0 : Depends: libxkbcommon0 (= 0.8.0-1) but 0.8.0-1ubuntu0.1 is to be installed
E: Unable to correct problems, you have held broken packages.
% apt-cache policy libxkbcommon0
libxkbcommon0:
Installed: 0.8.0-1ubuntu0.1
Candidate: 0.8.0-1ubuntu0.1
Version table:
*** 0.8.0-1ubuntu0.1 100
100 /var/lib/dpkg/status
0.8.0-1 500
500 http://archive.ubuntu.com/ubuntu bionic/main amd64 Packages
即,当我第一次安装它时libxkbcommon0
是0.8.0-1ubuntu0.1
,但现在是 版本0.8.0-1
(相同版本但没有ubuntu0.1
),这导致了一直出现“ Depends: xxx but it is not going to be installed
”错误的问题。
如何修复?
我的系统:
$ lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description: Ubuntu 18.04 LTS
Release: 18.04
Codename: bionic
$ uname -rm
4.15.0-20-generic x86_64
也就是说,我的源代码中没有其他非 x86 架构。