Cannot communicate with server

installed snapd with pacman, entered the command sudo systemctl enable --now snapd.socket and sudo ln -s /var/lib/snapd/snap /snap
I want to test snap with the command

sudo snap install hello-world

and here is such an error

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

here is what sudo systemctl status --now snapd.socket shows

snapd.socket - Socket activation for snappy daemon
     Loaded: loaded (/usr/lib/systemd/system/snapd.socket; enabled; preset: disabled)
     Active: active (listening) since Sat 2023-06-03 14:04:38 +05; 26 minutes ago
   Triggers: ● snapd.service
     Listen: /run/snapd.socket (Stream)
             /run/snapd-snap.socket (Stream)
      Tasks: 0 (limit: 9418)
     Memory: 0B
        CPU: 352us
     CGroup: /system.slice/snapd.socket

Jun 03 14:15:52 computeruniverse systemd[1]: snapd.socket: Socket unit configuration>
Jun 03 14:17:39 computeruniverse systemd[1]: snapd.socket: Socket unit configuration>
Jun 03 14:18:45 computeruniverse systemd[1]: snapd.socket: Socket unit configuration>
Jun 03 14:19:46 computeruniverse systemd[1]: snapd.socket: Socket unit configuration>
Jun 03 14:20:00 computeruniverse systemd[1]: snapd.socket: Socket unit configuration>
Jun 03 14:20:12 computeruniverse systemd[1]: snapd.socket: Socket unit configuration>

First, you install existing packages as a user, not with use of sudo.
Second, hello and world are not snap packages that exist. You most likely are looking for hello-world
snap install hello-world
I suggest you to go trough the https://wiki.manjaro.org/index.php/Snap wiki one more time …

1 Like

sorry, this is a typo, I wrote hello-world

I read the wiki and did everything according to the instructions, but unfortunately everything is exactly the same

You can try to go by first unmask the snapd.service:

systemctl unmask snapd.service

Enable it:

systemctl enable snapd.service

Start it:

systemctl start snapd.service

and then test again … maybe using the debug mode

SNAP_CONFINE_DEBUG=yes hello-world