Installing Chromium in container fails - sudo snap install chromium

In the past, I have been able to install Chromium (I believe it used Snap when it did ‘sudo apt install chromium-browser’).

Since then the LXD and Chromium versions have changed…

I wonder whether you see this as an LXD or Chromium bug?

ubuntu@container1:~$ lxc launch ubuntu:20.04 --profile default container1

ubuntu@container1:~$ lxc exec container1 -- sudo --user ubuntu --login

ubuntu@container1:~$ sudo snap install chromium
error: cannot perform the following tasks:
- Mount snap "chromium" (1328) ([start snap-chromium-1328.mount] failed with exit status 1: Job failed. See "journalctl -xe" for details.
)


ubuntu@container1:~$ journalctl -xe
-- 
-- A start job for unit snap-gtk\x2dcommon\x2dthemes-1506.mount has finished successfully.
-- 
-- The job identifier is 574.
Oct 07 00:24:12 container1 systemd[1]: Reloading.
Oct 07 00:24:12 container1 systemd[1]: /lib/systemd/system/dbus.socket:5: ListenStream= references a path below legacy directory /var/run/, updating /var/run/dbus/system_bus>
Oct 07 00:24:12 container1 systemd[1]: Mounting Mount unit for chromium, revision 1328...
-- Subject: A start job for unit snap-chromium-1328.mount has begun execution
-- Defined-By: systemd
-- Support: http://www.ubuntu.com/support
-- 
-- A start job for unit snap-chromium-1328.mount has begun execution.
-- 
-- The job identifier is 580.
Oct 07 00:24:12 container1 mount[6114]: Squashfs image uses lzo compression, this version supports only xz, zlib.
Oct 07 00:24:12 container1 systemd[1]: snap-chromium-1328.mount: Mount process exited, code=exited, status=255/EXCEPTION
-- Subject: Unit process exited
-- Defined-By: systemd
-- Support: http://www.ubuntu.com/support
-- 
-- An n/a= process belonging to unit snap-chromium-1328.mount has exited.
-- 
-- The process' exit code is 'exited' and its exit status is 255.
Oct 07 00:24:12 container1 systemd[1]: snap-chromium-1328.mount: Failed with result 'exit-code'.
-- Subject: Unit failed
-- Defined-By: systemd
-- Support: http://www.ubuntu.com/support
-- 
-- The unit snap-chromium-1328.mount has entered the 'failed' state with result 'exit-code'.
Oct 07 00:24:12 container1 systemd[1]: Failed to mount Mount unit for chromium, revision 1328.
-- Subject: A start job for unit snap-chromium-1328.mount has failed
-- Defined-By: systemd
-- Support: http://www.ubuntu.com/support
-- 
-- A start job for unit snap-chromium-1328.mount has finished with a failure.
-- 
-- The job identifier is 580 and the job result is failed.
Oct 07 00:24:12 container1 systemd[1]: Cannot find unit for notify message of PID 6111, ignoring.
Oct 07 00:24:12 container1 systemd[1]: Reloading.
Oct 07 00:24:13 container1 systemd[1]: /lib/systemd/system/dbus.socket:5: ListenStream= references a path below legacy directory /var/run/, updating /var/run/dbus/system_bus>
Oct 07 00:24:13 container1 snapd[521]: taskrunner.go:271: [change 3 "Mount snap \"chromium\" (1328)" task] failed: [start snap-chromium-1328.mount] failed with exit status 1>
Oct 07 00:24:13 container1 systemd[1]: Cannot find unit for notify message of PID 6145, ignoring.
Oct 07 00:24:14 container1 snapd[521]: handlers.go:495: Reported install problem for "chromium" as Crash report successfully submitted.
Oct 07 00:24:14 container1 sudo[5887]: pam_unix(sudo:session): session closed for user root

Can you report this at https://forum.snapcraft.io?

It looks like the shiny new LZO compressed snaps don’t work properly.

1 Like

I have now reported this at Snapcraft

I’ve also reported it internally. It’s indeed the newly enabled lzo compression that’s backfiring inside of containers.

squashfuse which is used inside containers can be built with LZO support but currently isn’t… the snapd team said they would quickly be adding the needed build dependencies so that it does support lzo.

Hopefully not too many snaps have made the switch so far and the situation will be resolved quickly.

1 Like