Return to Level1Techs.com

Pop_os - Unmet dependencies when updating

Hello, I tried updating my pop_os machine a few hours ago and was met with a hard crash. I decided to hard reset the machine as it was not responding to any inputs.

After a restart, i tried updating again via the command line.

sudo apt update and sudo apt upgrade.

but was met with this.

Hit:1 http://dl.google.com/linux/chrome/deb stable InRelease
Ign:2 http://developer.download.nvidia.com/compute/cuda/repos/ubuntu1804/x86_64  InRelease
Hit:3 http://us.archive.ubuntu.com/ubuntu focal InRelease                     
Hit:4 http://apt.pop-os.org/proprietary focal InRelease                       
Ign:5 http://developer.download.nvidia.com/compute/machine-learning/repos/ubuntu1804/x86_64  InRelease
Hit:6 http://developer.download.nvidia.com/compute/cuda/repos/ubuntu1804/x86_64  Release
Hit:7 http://developer.download.nvidia.com/compute/machine-learning/repos/ubuntu1804/x86_64  Release
Hit:8 http://ppa.launchpad.net/nilarimogard/webupd8/ubuntu focal InRelease
Hit:9 http://us.archive.ubuntu.com/ubuntu focal-security InRelease
Hit:11 http://us.archive.ubuntu.com/ubuntu focal-updates InRelease       
Hit:13 http://ppa.launchpad.net/system76/pop/ubuntu focal InRelease
Hit:14 http://us.archive.ubuntu.com/ubuntu focal-backports InRelease
Reading package lists... Done
Building dependency tree       
Reading state information... Done
11 packages can be upgraded. Run 'apt list --upgradable' to see them.
Reading package lists... Done
Building dependency tree       
Reading state information... Done
You might want to run 'apt --fix-broken install' to correct these.
The following packages have unmet dependencies:
 linux-headers-generic : Depends: linux-headers-5.4.0-7634-generic (= 5.4.0-7634.38~1590707589~20.04~1dd0040) but 5.4.0-7634.38~1591219791~20.04~6b1c5de is installed
 linux-image-generic : Depends: linux-modules-extra-5.4.0-7634-generic (= 5.4.0-7634.38~1590707589~20.04~1dd0040) but 5.4.0-7634.38~1591219791~20.04~6b1c5de is installed
E: Unmet dependencies. Try 'apt --fix-broken install' with no packages (or specify a solution).

no problem, did a apt --fix-broken install

Reading package lists... Done
Building dependency tree       
Reading state information... Done
Correcting dependencies... Done
The following packages were automatically installed and are no longer required:
  linux-headers-5.3.0-7648 linux-headers-5.3.0-7648-generic
  linux-headers-5.4.0-7626 linux-headers-5.4.0-7626-generic
  linux-image-5.3.0-7648-generic linux-image-5.4.0-7626-generic
  linux-modules-5.3.0-7648-generic linux-modules-5.4.0-7626-generic
  linux-modules-extra-5.3.0-7648-generic
  linux-modules-extra-5.4.0-7626-generic ubuntu-system-service
Use 'sudo apt autoremove' to remove them.
The following additional packages will be installed:
  linux-generic linux-headers-generic linux-image-5.4.0-7634-generic
  linux-image-generic linux-system76
Suggested packages:
  fdutils linux-doc | linux-source-5.4.0 linux-tools
The following packages will be upgraded:
  linux-generic linux-headers-generic linux-image-5.4.0-7634-generic
  linux-image-generic linux-system76
5 upgraded, 0 newly installed, 0 to remove and 6 not upgraded.
1 not fully installed or removed.
Need to get 0 B/11.7 MB of archives.
After this operation, 0 B of additional disk space will be used.
Do you want to continue? [Y/n] y
dpkg: error processing package linux-headers-5.4.0-7634-generic (--configure):
 package is in a very bad inconsistent state; you should
 reinstall it before attempting configuration
Errors were encountered while processing:
 linux-headers-5.4.0-7634-generic
E: Sub-process /usr/bin/dpkg returned an error code (1)

whoops. that’s a yikes.

looking around on ubuntu forums and others with unmet dependencies, i have tried various forms of “dkpg-reconfigure” and “dpkg --configure” but was met with unmet dependencies. kind of a catch-22.

Trying a little more, i did a “dpkg-reconfigure linux-headers-5.4.0-7634-generic”

which i suspected to be the culprit. here is the output.

/usr/sbin/dpkg-reconfigure: linux-headers-5.4.0-7634-generic is broken or not fully installed

this is as far as I’ve gotten.

There is a catch-22 with my not being able to reinstall the linux-headers file because of the unmet dependency, and needing to resolve the unmet dependency to reinstall the linux-header file.

running “sudo apt --reinstall install linux-headers-5.4.0-7634-generic” gives:

Reading package lists... Done
Building dependency tree       
Reading state information... Done
You might want to run 'apt --fix-broken install' to correct these.
The following packages have unmet dependencies:
 linux-headers-generic : Depends: linux-headers-5.4.0-7634-generic (= 5.4.0-7634.38~1590707589~20.04~1dd0040) but 5.4.0-7634.38~1591219791~20.04~6b1c5de is to be installed
 linux-image-generic : Depends: linux-modules-extra-5.4.0-7634-generic (= 5.4.0-7634.38~1590707589~20.04~1dd0040) but 5.4.0-7634.38~1591219791~20.04~6b1c5de is to be installed
E: Unmet dependencies. Try 'apt --fix-broken install' with no packages (or specify a solution).

I’ve tried all that I’ve found, hoping to resolve this. thank you.

Did you try apt reinstall on that package?

I have the same problem were you able to fix it?

Did you try running apt --fix-broken install or apt -yf install ?

Sorry for the late reply yes i tried everything, now can not even install a package with apt!