9

Whenever I try to do almost anything involving snap on the Windows 10 session of Ubuntu, I get this:

> sudo snap install htop

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

NotTheDr01ds
  • 17,888
Max
  • 633

1 Answers1

10

snaps use snapd which requires systemd which is not available under WSL.

https://forum.snapcraft.io/t/windows-subsystem-for-linux/216

inquam
  • 236
  • An absolutely correct (and succinct) answer. For those wanting more (perhaps too much ) information on Systemd support in WSL, see my answer here. – NotTheDr01ds Aug 22 '22 at 19:28
  • 4
    Sept. 2022 update: https://devblogs.microsoft.com/commandline/systemd-support-is-now-available-in-wsl/ but (as of time of writing this comment) does still seem to be a bit buggy – GWD Sep 25 '22 at 12:02