1

I continue to deal with apt. After unsuccesful apt-offline use I've got a message, that there are errors with broken count. I ran sudo apt-get check and got output:

You might want to run 'apt --fix-broken install' to correct these.
The following packages have unmet dependencies:
 systemd : Depends: libsystemd0 (= 237-3ubuntu10.33) but 237-3ubuntu10.39 is installed
 udev : Depends: libudev1 (= 237-3ubuntu10.33) but 237-3ubuntu10.39 is installed
E: Unmet dependencies. Try 'apt --fix-broken install' with no packages (or specify a solution).

But if I follow this advise, I see a long list of modules which will be removed (97), including init initramfs-tools initramfs-tools-core plymouth plymouth-label, etc. I did it once some time ago, broke my installation and was forced to reinstall Ubunte, so I think that execute this command is bad idea.

How can I fix this unmet dependencies without complete destroy my installation? Thank you!

Edited

Okey, it's turned out very simple in my case. On my offline Ubuntu I executed

sudo apt-get check

and got a list of packages with unmet dependecies.

Next on my online machine (actually, Win 10 Pro with Ubuntu 18.04.4 as WSL) I executed this command (from https://www.ostechnix.com/download-packages-dependencies-locally-ubuntu/)

$ apt-get download $(apt-rdepends package_wih_unmet | grep -v "^ " | sed 's/debconf-2.0/debconf/g')

(where package_wih_unmet is one of packeges from the list I've got on the previous step) in folder I've created for this purpose (for example, '~/python-crypto/'), for every package from the list above.

Next I copyed downloaded files to flash and on offline Ubunut simply ran sudo dpkg -i * in this folders.

For several iterations I've restored my System in unmet dependecies manner.

But I had to take my notebook with modem for efficiency.

1 Answers1

0

You can try sudo dpkg --configure -a.

Another solution would be:

sudo apt purge libsystemd0 libudev1
sudo apt install libsystemd0=237-3ubuntu10.33
sudo apt install libudev1=237-3ubuntu10.33
Kevin Bowen
  • 20,055
  • 57
  • 82
  • 84