Quick fix for Ubuntu WSL failing to update because of systemd
Hi everyone,
I’m a user of the Windows 10 WSL feature, where I run the Ubuntu distribution and always install the latest versions. I like to keep my packages up to date. Unfortunately, the latest Ubuntu release, 21.04 was not installed correctly and whenever I tried to update the system packages, it would error out when setting up systemd.
The solution to this seem to be a quick one. Turns out, the file libsystemd-shared-247.so
was there, in the /usr/lib/systemd
folder:
It seems that we can get around this issue by copying that file to the previous folder (/usr/lib
, so the following command should be used:
sudo cp /usr/lib/systemd/libsystemd-shared-247.so /usr/lib/
Now, go back to the previous folder and you should have it there:
Now you should be able to update your system packages without issues.
But now I’m getting this failure 😂: