I am trying to install heroku cli using
sudo snap install heroku --classic
The command line says
error: cannot communicate with server: Post http://localhost/v2/apps: dial unix /run/snapd.socket: connect: no such file or directory
I tried systemctl status snapd.service this is the result :
snapd.service
Loaded: masked (/dev/null; bad)
Active: inactive (dead)
I tried systemctl restart snapd.service it says:
Failed to restart snapd.service: Unit snapd.service is masked.
Any help on above problem in appreciated. Thanks.
Run this before attempting a snap install - it should work:
sudo apt-get update && sudo apt-get install -yqq daemonize dbus-user-session fontconfigsudo daemonize /usr/bin/unshare --fork --pid --mount-proc /lib/systemd/systemd --system-unit=basic.target
– Chris Halcrow Mar 24 '22 at 04:10exec sudo nsenter -t $(pidof systemd) -a su - $LOGNAME[boot] systemd=trueafter that, you should run wsl.exe --shutdown – Felipe Pereira Mar 16 '23 at 20:11