要在主板上安装 Qt,我需要下载多个软件包,但每次我在 libxi-dev 软件包中都会遇到此错误。我尝试单独下载依赖项,但仍然不起作用。我尝试从源下载。我更改了 /etc/apt/sources.list 文件,但此错误仍然存在。
我使用的主板安装了 Debian 9.13,我无法更改它。但在此之前,我使用的卡具有相同的操作系统,并且我没有收到这样的错误。我目前得到如下输出。没有解决是因为我找不到问题的根源。
sudo apt install libxi-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: libxi-dev : Depends:
> libxext-dev but it is not going to be installed
> Depends: libxfixes-dev but it is not going to be installed
> Depends: x11proto-input-dev (>= 2.1.99.6)
> E: Unable to correct problems, you have held broken packages.
这是我的sources.list 文件:
deb https://mirrors.huaweicloud.com/debian/ stretch main contrib non-free
deb-src https://mirrors.huaweicloud.com/debian/ stretch main contrib non-free
deb https://mirrors.huaweicloud.com/debian/ stretch-updates main contrib non-free
deb-src https://mirrors.huaweicloud.com/debian/ stretch-updates main contrib non-free
deb https://mirrors.huaweicloud.com/debian/ stretch-backports main contrib non-free
deb-src https://mirrors.huaweicloud.com/debian/ stretch-backports main contrib non-free
由于我以为问题出在sources.list上,所以我也使用了底部的sources.list,但结果没有改变。
deb http://http.debian.net/debian/ stretch main contrib non-free
deb-src http://http.debian.net/debian/ stretch main contrib non-free
deb http://security.debian.org/ stretch/updates main contrib non-free
deb-src http://security.debian.org/ stretch/updates main contrib non-free
deb http://http.debian.net/debian/ stretch-updates main contrib non-free
deb-src http://http.debian.net/debian/ stretch-updates main contrib non-free
答案1
这个解决方案解决了我的问题:
简而言之,sudo apt install aptitude
然后使用sudo aptitude install libxi-dev libxmu-dev
.
aptitude
具有与 不同的解决依赖关系的算法apt
,并且将提供多种解决方案供您接受或拒绝。