I built the lxd with the following commands:
git clone https://github.com/lxc/lxd
cd lxd
make
Then I ran lxd with the following commands:
$ $HOME/go/bin/lxd --group lxd -v -d
Error: This must be run as root
Then I ran lxd as root:
$ sudo $HOME/go/bin/lxd --group lxd -v -d
[sudo] password for hnakamur:
Error: exec: "setfattr": executable file not found in $PATH
Then I ran lxd with modified PATH:
$ sudo PATH=/snap/lxd/current/bin:$PATH $HOME/go/bin/lxd --group lxd -v -d
This time lxd successfully started, but when I try to create a network with the following command:
LXD_DIR=/var/lib/lxd $HOME/go/bin/lxc network create mynet1
The following error is printed on the lxd:
DEBUG [2022-10-02T16:13:19+09:00] Error Response
{
"type": "error",
"status": "",
"status_code": 0,
"operation": "",
"error_code": 500,
"error": "Failed to check dnsmasq version: Failed to run: dnsmasq --version: exit status 127 (dnsmasq: error while loading shared libraries: libidn.so.11: cannot open shared object file: No such file or directory)",
"metadata": null
} http_code=500
I stopped the lxd and ran it with the following command:
sudo PATH=/snap/lxd/current/bin:$PATH LD_LIBRARY_PATH=/snap/lxd/current/lib/x86_64-linux-gnu:/snap/core20/current/lib/x86_64-linux-gnu:/usr/lib/x86_64-linux-gnu $HOME/go/bin/lxd --group lxd -v -d
However it failed with the following errors:
$ sudo PATH=/snap/lxd/current/bin:$PATH LD_LIBRARY_PATH=/snap/lxd/current/lib/x86_64-linux-gnu:/snap/core20/current/lib/x86_64-linux-gnu:/usr/lib/x86_64-linux-gnu $HOME/go/bin/lxd --group lxd -v -d
/home/hnakamur/go/bin/lxd: /snap/core20/current/lib/x86_64-linux-gnu/libc.so.6: version `GLIBC_2.34' not found (required by /home/hnakamur/go/bin/lxd)
/home/hnakamur/go/bin/lxd: /snap/core20/current/lib/x86_64-linux-gnu/libc.so.6: version `GLIBC_2.33' not found (required by /home/hnakamur/go/bin/lxd)
/home/hnakamur/go/bin/lxd: /snap/core20/current/lib/x86_64-linux-gnu/libc.so.6: version `GLIBC_2.32' not found (required by /home/hnakamur/go/bin/lxd)
/home/hnakamur/go/bin/lxd: /snap/core20/current/lib/x86_64-linux-gnu/libc.so.6: version `GLIBC_2.34' not found (required by /usr/lib/x86_64-linux-gnu/libdqlite.so.0)
Could you tell me how to run lxd during development?
Thanks!