`lxc` client fails on a fresh install, Ubuntu 18.04 [solved]

I figured this out fairly quickly, but I figured I would document what worked for me just in case, because there’s nothing on this that shows up in a cursory Google search.

This is a fresh install of Ubuntu 18.04, all I did was install ZFS, autoremove lxd and lxd-client, then snap install lxd:

root@lxd-test:/snap/bin# snap info lxd | grep installed
installed:        3.20                   (13300) 69MB -
root@lxd-test:/snap/bin# lxc
/snap/lxd/13300/commands/lxc: 58: exec: lxc: not found

The fix for me was simply doing snap refresh core - I am not sure if I did something wrong during the installation, or what caused it, but just thought I’d leave something out there on the internet in case someone else ends up in the same situation.

1 Like

Most likely this relates to the $PATH caching by your shell (bash),
or your shell did not get the addition of /snap/bin to your $PATH.
If you log out and log in again, it should get things working again.