'lxc list' is not showing any status about the containers which are deployed by JUJU Charms on localhost (lxd cloud)

lxd won’t be able to show the list of juju controller and its deployed machines on lxd cloud (localhost). But when deploying JUJU with lxd cloud (localhost) in VM using virtualbox, it works fine. Kindly tell how to resolve this issue without using VM?

Could be that you have both the snap and deb installed on your system or that your client is configured to talk to a LXD other than your local one.

I have used these two commands for installation of juju and lxd. i.e, “sudo snap install juju --classic” for juju and " sudo apt install lxd zfsutils-linux" for lxd and zfs. is there a way to fix this ?