Getting an error installing lxd with sudo snap install lxd

error: cannot communicate with server: Post http://localhost/v2/snaps/lxd: dial unix /run/snapd.socket: connect: no such file or directory

There’s something wrong with your installation of snapd itself; try reinstalling it.

Running this in WSL

WSL doesn’t have systemd services enabled by default.
I believe Microsoft is now rolling out support for systemd in WSL, which you’d need to activate prior to being able to use snapd or LXD inside of your WSL environment.

1 Like

I enabled systemd but still getting same error.