[SOLVED] Can't install snap in LXC container

ndroftheline

Well-Known Member
Jun 17, 2017
35
18
48
37
Hey all,

I'm on $pveversion
pve-manager/6.1-8/806edfe1 (running kernel: 5.3.18-3-pve)

I found a couple useful-seeming posts on using snaps in LXC containers (specifically https://forum.proxmox.com/threads/ubuntu-snaps-inside-lxc-container-on-proxmox.36463/post-230060 ) and applied those requirements:

Code:
~$ cat /etc/pve/lxc/142.conf
arch: amd64
cores: 1
features: mount=fuse,nesting=1
hostname: wekan1
memory: 1512
net0: name=eth0,bridge=vmbr0,firewall=1,hwaddr=42:23:70:4C:96:A9,ip=dhcp,type=veth
ostype: ubuntu
rootfs: mkx-mass:subvol-142-disk-0,size=8G
swap: 1512
unprivileged: 1

In the container, squashfuse is already the newest version (0.1.100-0ubuntu2). This is in a Ubuntu 18.04 template that's been updated to latest.

# snap install hello-world
error: system does not fully support snapd: cannot mount squashfs image using
"squashfs": mount: /tmp/sanity-mountpoint-612465744: mount failed: Operation
not permitted.

What did I miss?

Also, as an aside, this post looked useful to me (since I'm actually trying to run the wekan snap in this container anyway ultimately): https://github.com/wekan/wekan-snap/issues/30

But that's using OpenVZ which I realize now is not relevant to proxmox anymore, not sure if that context helps at all.

Thanks for any input!
 
Hm, think I fixed it. There's a tickbox in the container features that just says FUSE, which adds fuse=1 to the features: line in the $vmid.conf file.

Now i have:

Code:
~$ cat /etc/pve/nodes/mkx/lxc/142.conf
arch: amd64
cores: 1
features: fuse=1,mount=fuse,nesting=1
hostname: wekan1
memory: 1512
net0: name=eth0,bridge=vmbr0,firewall=1,hwaddr=42:23:70:4C:96:A9,ip=dhcp,type=veth
ostype: ubuntu
rootfs: mkx-mass:subvol-142-disk-0,size=8G
swap: 1512
unprivileged: 1

and i can install the hello-world snap OK.
 
yes, this is working, don't actaully need the mount=fuse feature manually added just ticking "FUSE" and "Nesting" works fine. I do get this error on the first attempt to install any snap:

Code:
error: cannot perform the following tasks:
- Setup snap "core" (8935) security profiles (cannot setup udev for snap "core": cannot reload udev rules: exit status 2
udev output:
)
- Setup snap "core" (8935) security profiles (cannot reload udev rules: exit status 2
udev output:
)

but then re-running the snap install command a second time works, and the snaps appear to be working correctly in my (very limited) testing.
 
Did this a while back with success for a few snaps. However, now I'm needing to install the chromium snap (to satisfy a dependency) and am running into the same error above. Rerunning doesn't help. Any ideas?
 
núcleo de instalação instantânea; núcleo de atualização instantânea
erro: o sistema não é totalmente compatível com snapd: não é possível montar a imagem squashfs usando "squashfs": mount:
/ tmp / sanity-mountpoint-884756066: montagem falhou: operação não permitida.
erro: o sistema não é totalmente compatível com snapd: não é possível montar a imagem squashfs usando "squashfs": mount:
/ tmp / sanity-mountpoint-884756066: montagem falhou: operação não permitida.
 
Code:
error: cannot perform the following tasks:
- Setup snap "core" (8935) security profiles (cannot setup udev for snap "core": cannot reload udev rules: exit status 2
udev output:
)
- Setup snap "core" (8935) security profiles (cannot reload udev rules: exit status 2
udev output:
)

but then re-running the snap install command a second time works, and the snaps appear to be working correctly in my (very limited) testing.

Thanks for this thread. I can confirm that `snap install hello-world` gives me a similar error, but running it a second time works.

My error is:
Code:
error: cannot perform the following tasks:
- Setup snap "core" (10823) security profiles (cannot reload udev rules: exit status 1
udev output:
Failed to send reload request: No such file or directory
)
 
As per https://github.com/lxc/lxc/issues/1854 and specifically https://github.com/lxc/lxc/issues/1854#issuecomment-606241047 , I did the following in the container:
Code:
sudo apt update && sudo apt dist-upgrade
sudo apt install squashfuse fuse
sudo apt install snapd
sudo mkdir /lib/modules

From the Proxmox host, edit the config file at /etc/pve/lxc/<CTID>.conf and add:
Code:
# Mounting fuse (for snap squashfs)
lxc.mount.entry = /dev/fuse dev/fuse none bind,create=file,optional

# Mount cgroup in rw to get snaps working
lxc.mount.auto=cgroup:rw
Then shutdown and start your container.

Install your desired snap, get the following error:
Code:
error: cannot perform the following tasks:
- Setup snap "snapd" (11107) security profiles (cannot reload udev rules: exit status 1
udev output:
Failed to send reload request: No such file or directory
Install the same snap again, then it works.
 
  • Like
Reactions: bzc and vgwizardx
Hi! I'm having the same issue as other people mentioned:

Code:
sudo snap install chromium
error: cannot perform the following tasks:
- Setup snap "chromium" (1536) security profiles (cannot setup udev for snap "chromium": cannot reload udev rules: exit status 1
udev output:
Failed to send reload request: No such file or directory
)
- Setup snap "chromium" (1536) security profiles (cannot setup udev for snap "chromium": cannot reload udev rules: exit status 1
udev output:
Failed to send reload request: No such file or directory
)
- Setup snap "chromium" (1536) security profiles (cannot setup udev for snap "chromium": cannot reload udev rules: exit status 1
udev output:
Failed to send reload request: No such file or directory
)

However, attempting to run the command again gets no different results. It just keeps failing the same way. Installing other snaps seems to work...Installing core didn't throw any errors. Any ideas? This is a non-privileged container.
 
Last edited:
Well, running the same command again (not even a restart) fixed the issue o_O
Edit: Running certbot gives no output :(
 
Last edited:
Hi! I'm having the same issue as other people mentioned:

Code:
sudo snap install chromium
error: cannot perform the following tasks:
- Setup snap "chromium" (1536) security profiles (cannot setup udev for snap "chromium": cannot reload udev rules: exit status 1
udev output:
Failed to send reload request: No such file or directory
)
- Setup snap "chromium" (1536) security profiles (cannot setup udev for snap "chromium": cannot reload udev rules: exit status 1
udev output:
Failed to send reload request: No such file or directory
)
- Setup snap "chromium" (1536) security profiles (cannot setup udev for snap "chromium": cannot reload udev rules: exit status 1
udev output:
Failed to send reload request: No such file or directory
)

However, attempting to run the command again gets no different results. It just keeps failing the same way. Installing other snaps seems to work...Installing core didn't throw any errors. Any ideas? This is a non-privileged container.
Same problem here does there is any fix for this ?
 
As per https://github.com/lxc/lxc/issues/1854 and specifically https://github.com/lxc/lxc/issues/1854#issuecomment-606241047 , I did the following in the container:
Code:
sudo apt update && sudo apt dist-upgrade
sudo apt install squashfuse fuse
sudo apt install snapd
sudo mkdir /lib/modules

From the Proxmox host, edit the config file at /etc/pve/lxc/<CTID>.conf and add:
Code:
# Mounting fuse (for snap squashfs)
lxc.mount.entry = /dev/fuse dev/fuse none bind,create=file,optional

# Mount cgroup in rw to get snaps working
lxc.mount.auto=cgroup:rw
Then shutdown and start your container.

Install your desired snap, get the following error:
Code:
error: cannot perform the following tasks:
- Setup snap "snapd" (11107) security profiles (cannot reload udev rules: exit status 1
udev output:
Failed to send reload request: No such file or directory
Install the same snap again, then it works.
its help for me
thanks
 
  • Like
Reactions: bzc
Code:
snap install httpie
error: system does not fully support snapd: cannot mount squashfs image using "squashfs": mount:
       /tmp/syscheck-mountpoint-723081950: mount failed: Operation not permitted.

I'm having the same problem
 
Last edited:
As per https://github.com/lxc/lxc/issues/1854 and specifically https://github.com/lxc/lxc/issues/1854#issuecomment-606241047 , I did the following in the container:
Code:
sudo apt update && sudo apt dist-upgrade
sudo apt install squashfuse fuse
sudo apt install snapd
sudo mkdir /lib/modules

From the Proxmox host, edit the config file at /etc/pve/lxc/<CTID>.conf and add:
Code:
# Mounting fuse (for snap squashfs)
lxc.mount.entry = /dev/fuse dev/fuse none bind,create=file,optional

# Mount cgroup in rw to get snaps working
lxc.mount.auto=cgroup:rw
Then shutdown and start your container.

Install your desired snap, get the following error:
Code:
error: cannot perform the following tasks:
- Setup snap "snapd" (11107) security profiles (cannot reload udev rules: exit status 1
udev output:
Failed to send reload request: No such file or directory
Install the same snap again, then it works.
this option worked
 
As per https://github.com/lxc/lxc/issues/1854 and specifically https://github.com/lxc/lxc/issues/1854#issuecomment-606241047 , I did the following in the container:
Code:
sudo apt update && sudo apt dist-upgrade
sudo apt install squashfuse fuse
sudo apt install snapd
sudo mkdir /lib/modules

From the Proxmox host, edit the config file at /etc/pve/lxc/<CTID>.conf and add:
Code:
# Mounting fuse (for snap squashfs)
lxc.mount.entry = /dev/fuse dev/fuse none bind,create=file,optional

# Mount cgroup in rw to get snaps working
lxc.mount.auto=cgroup:rw
Then shutdown and start your container.

Install your desired snap, get the following error:
Code:
error: cannot perform the following tasks:
- Setup snap "snapd" (11107) security profiles (cannot reload udev rules: exit status 1
udev output:
Failed to send reload request: No such file or directory
Install the same snap again, then it works.
Thank you very much. this solved my problem!
 

About

The Proxmox community has been around for many years and offers help and support for Proxmox VE, Proxmox Backup Server, and Proxmox Mail Gateway.
We think our community is one of the best thanks to people like you!

Get your subscription!

The Proxmox team works very hard to make sure you are running the best software and getting stable updates and security enhancements, as well as quick enterprise support. Tens of thousands of happy customers have a Proxmox subscription. Get yours easily in our online shop.

Buy now!