Can I launch the Snap store in WSL (Win 11)?

ReddSpark 5 Reputation points
2023-02-08T10:44:31.1033333+00:00

I don't think WSL has Snap store by default? So I tried to install it using

sudo snap install snap-store

and I got the error:

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

Edit:

It may be the solution is mentioned here. Specifically:

sudo systemctl start snapd

However this tells me:

System has not been booted with systemd as init system (PID 1). Can't operate.

which from a quick google sounds like it can be enabled but doing so will mean my WSL is not so light-weight any more and thefore might be better to avoid it. Anyone able to help shed light on any of the above?

Windows 11
Windows 11
A Microsoft operating system designed for productivity, creativity, and ease of use.
10,694 questions
0 comments No comments
{count} vote

1 answer

Sort by: Most helpful
  1. Khurram Rahim 1,851 Reputation points
    2023-02-08T11:01:23.8566667+00:00

    This error message is indicating that the snapd service is not running on the localhost. Snapd is a service that manages and interacts with snaps on Linux systems.

    To resolve the issue, you can try restarting the snapd service on your system. You can do this by using the following command in a terminal:

    Copy code
    sudo systemctl restart snapd
    

    If the service is still not running, you can try reinstalling the snapd package using the following command:

    sqlCopy code
    sudo apt-get install --reinstall snapd
    

    If the issue persists, it may be helpful to check the logs for the snapd service to determine the cause of the issue. You can do this by using the following command:

    Copy code
    journalctl -u snapd
    
    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.