Problem installing Powershell on Linux

$ sudo snap install powershell --classic
error: cannot communicate with server: Post http://localhost/v2/snaps/powershell: dial unix /run/snapd.socket: connect: connection refused

Perhaps the snapd daemon isn’t running. You need at least the snapd socket to be running. Try systemctl enable --now snapd.socket. This is normally done automatically when the snapd package is installed, but on some distros (eg. CentOS, Arch) you need to do it manually.