Q: E: Unable to correct problems, you have held broken packages. (Debian 9.13) To install Qt on a motherboard I need to download several packages, but every time I get this error in the libxi-dev package. I tried to download the dependencies separately but it still didn't work. I tried downloading from source. I changed the /etc/apt/sources.list file but this error persisted.
The motherboard I use came with Debian 9.13 installed and I can't change it. But before that, the card I used had the same operating system and I did not get such an error.
I am currently getting an output like below. It is not solved because I cannot find the source of the problem.

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.

Here is my sources.list file :


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

Since I thought the problem was in the sources.list, I also used the sources.list at the bottom, but the result did not change.
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


A: This solution fixed my problems:
https://askubuntu.com/questions/804246/cant-install-libxi-dev-and-libxmu-dev-on-ubuntu-16-04-because-of-unmet-dependen
In short, sudo apt install aptitude and then use sudo aptitude install libxi-dev libxmu-dev.
aptitude has a different algorithm for resolving dependencies than apt, and will offer several solutions for you to accept or reject.
