I'm having trouble upgrading packages in my WSL Ubuntu on Windows 10 Pro. I've been using this particular machine and installation of Ubuntu for 3 months, and would like to figure out how to avoid re-installing my environment if at all possible, but I'm really at a loss here. Any suggestions?
When I run sudo apt upgrade
, I get the following output:
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:
libnss-systemd : Depends: systemd (= 237-3ubuntu10.15) but 237-3ubuntu10.13 is installed
libpam-systemd : Depends: systemd (= 237-3ubuntu10.15) but 237-3ubuntu10.13 is installed
systemd : Depends: libsystemd0 (= 237-3ubuntu10.13) but 237-3ubuntu10.15 is installed
udev : Depends: libudev1 (= 237-3ubuntu10.13) but 237-3ubuntu10.15 is installed
E: Unmet dependencies. Try 'apt --fix-broken install' with no packages (or specify a solution).
When I run sudo apt install -f
, I get the following output:
Reading package lists... Done
Building dependency tree
Reading state information... Done
Correcting dependencies... Done
The following additional packages will be installed:
systemd udev
Suggested packages:
systemd-container
The following packages will be upgraded:
systemd udev
2 upgraded, 0 newly installed, 0 to remove and 7 not upgraded.
5 not fully installed or removed.
Need to get 0 B/3999 kB of archives.
After this operation, 8192 B of additional disk space will be used.
Do you want to continue? [Y/n]
(Reading database ... 29950 files and directories currently installed.)
Preparing to unpack .../systemd_237-3ubuntu10.15_amd64.deb ...
Unpacking systemd (237-3ubuntu10.15) over (237-3ubuntu10.13) ...
dpkg: error processing archive /var/cache/apt/archives/systemd_237-3ubuntu10.15_amd64.deb (--unpack):
unable to clean up mess surrounding './bin/loginctl' before installing another version: Invalid argument
dpkg-deb: error: paste subprocess was killed by signal (Broken pipe)
Preparing to unpack .../udev_237-3ubuntu10.15_amd64.deb ...
Unpacking udev (237-3ubuntu10.15) over (237-3ubuntu10.13) ...
dpkg: error processing archive /var/cache/apt/archives/udev_237-3ubuntu10.15_amd64.deb (--unpack):
unable to clean up mess surrounding './bin/udevadm' before installing another version: Invalid argument
dpkg-deb: error: paste subprocess was killed by signal (Broken pipe)
Errors were encountered while processing:
/var/cache/apt/archives/systemd_237-3ubuntu10.15_amd64.deb
/var/cache/apt/archives/udev_237-3ubuntu10.15_amd64.deb
E: Sub-process /usr/bin/dpkg returned an error code (1)
I've tried everything I can think of short of using --force-remote-reinstreq
down the chain of packages dependent on systemd and udev as per this answer: How to delete broken packages in ubuntu.
I have also tried the solution presented in How to fix unmet dependencies for udev:amd64 error on Ubuntu 18.04?.