I’ve installed snapd 2.29.4 (Debian ships 2.27.6-2 atm.) on Debian Testing/Buster, to install the LXD snap. See Snapd vs upstream kernel vs apparmor for details.
But i’m unable to run lxd via snap:
# /snap/bin/lxd
lxd: error while loading shared libraries: liblxc.so.1: cannot open shared object file: No such file or directory
Additional i see in the logs:
Dec 15 16:21:57 debianbox lxd.daemon[6975]: => Preparing the system
Dec 15 16:21:57 debianbox lxd.daemon[6975]: /snap/lxd/5235/wrappers/daemon.start: 16: /snap/lxd/5235/wrappers/daemon.start: LD_LIBRARY_PATH: parameter not set
Workaround
set the following aliases in my .bashrc:
alias lxd="SNAP_COMMON=/snap/lxd/common SNAP=/snap/lxd/current /snap/lxd/current/command-lxd.wrapper"
alias lxc="SNAP_COMMON=/snap/lxd/common SNAP=/snap/lxd/current /snap/lxd/current/command-lxc.wrapper"
And install uidmap:
apt install uidmap
also set some sub{u|g}id’s:
echo "root:1000000:1000000000" > /etc/subuid
echo "root:1000000:1000000000" > /etc/subgid
create group lxd:
groupadd -r lxd
usermod -a -G lxd <yourusername>
newgrp
then start lxd manualy.
lxd --group=lxd
then edit the default profile:
config:
raw.lxc: |-
lxc.apparmor.allow_incomplete = 1
....
Anyone have a clue howto fix this?