As far as I have been able to test, you don't actually need to create the /lib/modules directory but just run the command twice. At least that is what I have been doing in unprivileged containers on Proxmox 7.1 with the FUSE option activated:
~# apt install gnupg fuse squashfuse snapd Shutdown container. Start again. ~# snap install core error: cannot perform the following tasks: - Setup snap "core" (11993) security profiles (cannot reload udev rules: exit status 1 udev output: Failed to send reload request: No such file or directory ) ~# snap install core core 16-2.52.1 from Canonical✓ installed -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/1712808 Title: udev interface fails in privileged containers To manage notifications about this bug go to: https://bugs.launchpad.net/snapd/+bug/1712808/+subscriptions -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs