2

I have been trying to get snap working on my Ubuntu machine for a while, but got nowhere. So I decided to upgrade to the latest LTS version of 20.04.

error: system does not fully support snapd: cannot mount squashfs image using "squashfs": mount:
       /tmp/sanity-mountpoint-760118298: wrong fs type, bad option, bad superblock on /dev/loop0,
       missing codepage or helper program, or other error.

Everything seeemed to install ok and I got the prompt about choosing a version of LXD. I chose 4.0 as it recommended.

However, now when I try to install anything using apt I get the following error (still related to snap):

Reading package lists... Done
Building dependency tree
Reading state information... Done
You might want to run 'apt --fix-broken install' to correct these.
The following packages have unmet dependencies.
 lxd-client : Depends: lxd (>= 1:0.9) but it is not installed
E: Unmet dependencies. Try 'apt --fix-broken install' with no packages (or specify a solution).

Then when I run sudo apt --fix-broken install, it tries to use snap and I get this:

Do you want to continue? [Y/n] y
Preconfiguring packages ...
(Reading database ... 290280 files and directories currently installed.)
Preparing to unpack .../archives/lxd_1%3a0.9_all.deb ...
=> Installing the LXD snap
==> Checking connectivity with the snap store
==> Installing the LXD snap from the 4.0 track for ubuntu-20.04
error: system does not fully support snapd: cannot mount squashfs image using "squashfs": mount:
       /tmp/sanity-mountpoint-353261804: wrong fs type, bad option, bad superblock on /dev/loop0,
       missing codepage or helper program, or other error.
dpkg: error processing archive /var/cache/apt/archives/lxd_1%3a0.9_all.deb (--unpack):
 new lxd package pre-installation script subprocess returned error exit status 1
Errors were encountered while processing:
 /var/cache/apt/archives/lxd_1%3a0.9_all.deb
E: Sub-process /usr/bin/dpkg returned an error code (1)

I cannot install anything now as this keeps going around in circles.

$ lxd version

Command 'lxd' not found, but can be installed with:

sudo snap install lxd            # version 4.7, or
sudo apt  install lxd-installer  # version 1
sudo apt  install lxd            # version 1:0.9

See 'snap info lxd' for additional versions.
$ sestatus

Command 'sestatus' not found, but can be installed with:

sudo apt install policycoreutils
MeanwhileInHell
  • 121
  • 1
  • 4
  • 1
    Try `sudo apt install fuse squashfuse` ref: https://snapcraft.io/docs/installing-snap-on-fedora – user.dz Nov 11 '20 at 19:38
  • 2
    Does this answer your question? [system does not fully support snapd: cannot mount squashfs image using "squashfs - mount failed](https://askubuntu.com/questions/1241781/system-does-not-fully-support-snapd-cannot-mount-squashfs-image-using-squashfs) – BeastOfCaerbannog Feb 09 '21 at 12:25

1 Answers1

0

Sounds like your path isn't going into /snap/bin. On my box:

$ echo $PATH
/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin

$ which lxd
/snap/bin/lxd

$ lxc --version
4.11

In terms of your original question, the last time I saw this issue was because the kernel didn't support squashfs. Assuming you are on Ubuntu 20.04, run:

sudo apt install linux-image-generic-hwe-20.04 linux-headers-generic-hwe-20.04
sudo reboot

Hope it helps

BeastOfCaerbannog
  • 12,964
  • 10
  • 49
  • 77
Simon Banks
  • 1,177
  • 4
  • 19