I am trying to resolve the udev issue in my WSL, and I am following the "Apt-get upgrade errors" troubleshooting steps in the WSL docs.
To fix issues related to udev, follow the following steps:
Write the following to
/usr/sbin/policy-rc.d
and save your changes:#!/bin/sh
andexit 101
Add execute permissions to
/usr/sbin/policy-rc.d
:chmod +x /usr/sbin/policy-rc.d
Run the following commands:
dpkg-divert --local --rename --add /sbin/initctl
and thenln -s /bin/true /sbin/initctl
However it seems that the file policy-rc.d
does not exist yet?
Is it missing or do I need to create it? As this is not complete clear for me from the documentation? I use Ubunut 20.04.