I’ve created a Ubuntu 22.04 container with a desktop environment to access via VNC. The desktop environment and VNC runs fine, but when trying to install Firefox I run into this issue:
root@vdi02:~# snap install firefox
error: cannot perform the following tasks:
Run hook connect-plug-host-hunspell of snap “firefox” (run hook “connect-plug-host-hunspell”:
update.go:85: cannot change mount namespace according to change mount (/var/lib/snapd/hostfs/usr/share/cups/doc-root /usr/share/cups/doc-root none bind,ro 0 0): cannot create directory “/usr/share/cups/
doc-root”: permission denied
update.go:85: cannot change mount namespace according to change mount (/var/lib/snapd/hostfs/usr/share/gimp/2.0/help /usr/share/gimp/2.0/help none bind,ro 0 0): cannot create directory “/usr/share/gimp/
2.0”: permission denied
update.go:85: cannot change mount namespace according to change mount (/var/lib/snapd/hostfs/usr/share/libreoffice/help /usr/share/libreoffice/help none bind,ro 0 0): cannot create directory “/usr/share
/libreoffice/help”: permission denied
update.go:85: cannot change mount namespace according to change mount (/var/lib/snapd/hostfs/usr/share/xubuntu-docs /usr/share/xubuntu-docs none bind,ro 0 0): cannot open directory “/var/lib”: permissio
n denied
error: error running snapctl: cannot start mount unit: systemctl command [start var-snap-firefox-common-host\x2dhunspell.mount] failed with exit status 1: A dependency job for var-snap-firefox-common-ho
st\x2dhunspell.mount failed. See ‘journalctl -xe’ for details.
-----)
Do I need to configure some setting on the container to allow bind mounts inside the container or something similar?
Host OS is Ubuntu 22.04, more or less vanilla install
lxd is version 5.6-794016a, according to snap list
The container I’m running is the standard ubuntu:22.04 container
Run hook connect-plug-host-hunspell of snap “firefox” (run hook “connect-plug-host-hunspell”:
update.go:85: cannot change mount namespace according to change mount (/var/lib/snapd/hostfs/usr/share/cups/doc-root /usr/share/cups/doc-root none bind,ro 0 0): cannot create directory “/usr/share/cups/doc-root”: permission denied
update.go:85: cannot change mount namespace according to change mount (/var/lib/snapd/hostfs/usr/share/gimp/2.0/help /usr/share/gimp/2.0/help none bind,ro 0 0): cannot create directory “/usr/share/gimp/2.0”: permission denied
update.go:85: cannot change mount namespace according to change mount (/var/lib/snapd/hostfs/usr/share/gtk-doc /usr/share/gtk-doc none bind,ro 0 0): cannot open directory “/var/lib”: permission denied
update.go:85: cannot change mount namespace according to change mount (/var/lib/snapd/hostfs/usr/share/libreoffice/help /usr/share/libreoffice/help none bind,ro 0 0): cannot create directory “/usr/share/libreoffice/help”: permission denied
update.go:85: cannot change mount namespace according to change mount (/var/lib/snapd/hostfs/usr/share/xubuntu-docs /usr/share/xubuntu-docs none bind,ro 0 0): cannot open directory “/var/lib”: permission denied
error: error running snapctl: cannot start mount unit: systemctl command [start var-snap-firefox-common-host\x2dhunspell.mount] failed with exit status 1: A dependency job for var-snap-firefox-common-host\x2dhunspell.mount failed. See ‘journalctl -xe’ for details.
-----)
root@snaptest:~#
apt install snapd
systemctl status snapd -> check the status of the snapd if it doesnt work execute the following
systemctl start/restart snapd -> start or restart the snap service
snap install firefox
@qupfer - great find thx. Good someone had already filed a bug on this. Anyone having this problems should include themselves in “it affects me” count on launchpad.