Package has unmet dependencies: libgirepository-1.0-1 breaks python-gi (<3.42.0-1+b1) but 3.30.4-1 is to be installed
After updating Debian 11 bullseye testing using sudo apt dist-upgrade, the following error occurred:
The following packages have unmet dependencies:libgirepository-1.0-1 : Breaks: python-gi (<3.42.0-1+b1) but 3.30.4-1 is to be installedE: Unable to correct problems, you have held broken packages.And deepin-wine QQ, TIM, Photoshop CS 6 all cannot be used.
After reading many articles online about solving libgirepository-1.0-1, none could solve it. After several backups and restores, I summarized this method.
Uninstall the source of dependency error libgirepository-1.0-1 (currently the latest system version)
$ sudo apt remove libgirepository-1.0-1Manually install libgirepository-1.0-1_1.64.0-2_amd64.deb, gir1.2-glib-2.0_1.64.0-2_amd64.deb, python-gi_3.36.0-1_amd64.deb (old version required by deepin-wine)
$ sudo dpkg -i libgirepository-1.0-1_1.64.0-2_amd64.deb$ sudo dpkg -i gir1.2-glib-2.0_1.64.0-2_amd64.deb$ sudo dpkg -i python-gi_3.36.0-1_amd64.debThis method is only a temporary solution. Normal updates using sudo apt update and sudo apt upgrade work fine. If using sudo apt dist-upgrade to update, the previous error will repeat, and you need to solve it again using this method.