Comment 18 for bug 1712808

Revision history for this message
Marco Trevisan (Treviño) (3v1n0) wrote :

Looks like that the error message is quite misleading... Installing and running snaps in privileged containers works quite well, the problem is that apparently udev needs `/lib/modules/` to be available.

In fact, in a completely new privileged LXD instance:

ubuntu@ubuntu-bp:~$ sudo snap install hello
error: cannot perform the following tasks:
- Setup snap "core" (11993) security profiles (cannot reload udev rules: exit status 2
udev output:
)
ubuntu@ubuntu-bp:~$ sudo mkdir /lib/modules
ubuntu@ubuntu-bp:~$ sudo snap install hello
Download snap "core" (11993) from channel "stable" \error: change finished in status "Undone" with no error message
ubuntu@ubuntu-bp:~$ sudo snap install hello
2021-12-02T13:36:05Z INFO Waiting for automatic snapd restart...
hello 2.10 from Canonical✓ installed
ubuntu@ubuntu-bp:~$ hello
Hello, world!

So I think that this issue is really easy to fix, we just need to ensure that such directory is there.