1

I am running Debian 12 bookworm on WSL.

I need multipass, which does not have a Debian package, but the multipass github README says to install it in linux with snap.

I attempted to install snapd with sudo apt-get install snapd. This installs a snap binary, but when I try to install multipass, I get an error:

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

It looks like there is some snapd daemon listener that is not open on TCP port 80 (http), but I can't find how to start it.

$ sudo service snap start
snap: unrecognized service
$
$ sudo service snapd start
snapd: unrecognized service
$

How do I snap install multipass on Debian 12 bookworm (under WSL)?

1 Answers1

1

The solution is explained in using the instructions in this github ticket response: WSL2- Ubuntu 20.04 Snap store doesn't work due to systemd dependency #5126.

Explicitly, to fix your snapd install so your snapd listens on a socket (enabling you to run snap install multipass):

  • Login to your Debian 12 WSL instance
  • Ensure that you are connected to the internet
  • sudo apt-get install -yqq daemonize dbus-user-session fontconfig
  • sudo daemonize /usr/bin/unshare --fork --pid --mount-proc /lib/systemd/systemd --system-unit=basic.target
  • exec sudo nsenter -t $(pidof systemd) -a su - $LOGNAME

Note: the last nsenter command may not be required; it is also not available in the Debian 12 util-linux package.

harrymc
  • 498,455