Я некоторое время пытался заставить snap
работать на моей машине Ubuntu, но ничего не добился. Поэтому я решил обновить LTS до последней версии 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.
Все вроде бы установилось нормально, и я получил подсказку о выборе версии LXD. Я выбрал 4.0, как и рекомендовал.
Однако теперь, когда я пытаюсь установить что-либо с помощью apt
, я получаю следующую ошибку (все еще связанную с 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).
Затем, когда я запускаю sudo apt --fix-broken install
, он пытается использовать snap
, и я получаю следующее:
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)
Я не могу ничего установить сейчас, так как это продолжается по кругу.
$ 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
Похоже, ваш путь не ведет в /snap/bin
.
На моем ящике:
$ 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
Что касается вашего первоначального вопроса, последний раз, когда я видел эту проблему, было то, что ядро не поддерживало squashfs
. Предполагая, что вы используете Ubuntu 20.04, запустите:
sudo apt install linux-image-generic-hwe-20.04 linux-headers-generic-hwe-20.04
sudo reboot
Надеюсь, это поможет