Ubuntu: dpkg: error processing package XXX (–configure)

created at 02-13-2022 views: 74

problem

Solve the Ubuntu installation software prompt dpkg: error processing package XXX (–configure), (red warning in the upper right corner of ubuntu).

message:

dpkg: error processing package nghttp2 (--configure):
 dependency problems - leaving unconfigured
 ...

solution

sudo mv /var/lib/dpkg/info/ /var/lib/dpkg/info_old/
sudo mkdir /var/lib/dpkg/info/
sudo apt-get update

sudo apt-get -f install

sudo mv /var/lib/dpkg/info/* /var/lib/dpkg/info_old/
sudo rm -rf /var/lib/dpkg/info
sudo mv /var/lib/dpkg/info_old/ /var/lib/dpkg/info/
created at:02-13-2022
edited at: 02-13-2022: