Unmet dependencies - cannot remove package libgbm1
Solution 1
The problem here is to lock down the trouble maker package and kick it out. Then you can fix inconsistent dependencies with sudo apt-get -f install
.
So with cautious you may use: sudo dpkg --force-all -P libgbm1
to force removing the broken. This command may damage your system, so you should watch it. And try to fix: sudo apt-get -f install
.
If any packages are corrupting as well, repeat above steps cautiously. And each time you removed broken packages, try to fix them. I tackled my problem in this case.
Solution 2
Instead of rushing to remove your broken packages using the --force-all
option of dpkg
, first try removing it without this option, using simply
dpkg -P package-name
In my case, dpkg
printed why it couldn't remove this package: another package depended on it. After I removed the dependee, the broken package could finally be removed, without any --force-anything
.
This may require several recursive removals in case when the dependee is also broken, but the end result should be fixing the dependency chain, which apt
was unable to fix, by removals.
Related videos on Youtube
knh170
Python programmer for 5 years, while engineering Ruby on Rails. Undergraduate in Macau.
Updated on September 18, 2022Comments
-
knh170 over 1 year
In this case I have the
libgbm1
being held, giving me message like:Error, pkgProblemResolver::Resolve generated breaks, this may be caused by held packages.
Since I carefully read How do I resolve unmet dependencies after adding a PPA? I tried to remove the broken package with
sudo apt-get remove libgbm1
as suggested. However, remove command gave me the same error.sudo apt-get upgrade
doesn't upgrade this package ("...and 1 not upgraded."
). And I need this one to build some other packages that depends on it (pkgProblemResover
problem again). It seems I cannot revert the version nor move forward.Steps I've ever tried:
- disabling some ppa repositories in
software updates
andsudo apt-get update
then tried to fix with apt, which didn't work. -
sudo apt-get -f install
withand 1 not upgraded
. - tried to install packages that
libgbm1
depends on. But more packages coming forward and quickly piles up to tens of them, which seems unreliable to handle, and they also reported similar errors.
Why couldn't I remove the package? How to fix it?
- disabling some ppa repositories in
-
Jérémy Pouyet almost 6 yearsThank you, two days of pain before to find your answer! However I have to complete your answer because I had to run
sudo apt --fix-broken install
aftersudo dpkg --force-all -P libgbm1
to finish the install -
wlh over 5 yearsThis was the only solution I could find that worked to help me with my problem, unable to install because of unmet dependencies
-
deadfish over 2 yearsThank you
sudo dpkg --force-all -P <package>
was the solution for my problem.