Snapd not start automatic

when i try to use sudo snap install hello-world it will show error
error: cannot communicate with server: Post "http://localhost/v2/snaps/hello-world": dial unix /run/snapd.socket: connect: no such file or directory
i must use systemctl start snapd.service before use snap command every time
after reinstall i see this error
snapd.recovery-chooser-trigger.service is a disabled or a static unit, not starting it. snapd.seeded.service is a disabled or a static unit, not starting it. snapd.service is a disabled or a static unit, not starting it. snapd.socket is a disabled or a static unit, not starting it.
please help,thank.

Welcome. Which distribution is that? Snapd should be enabled by default on Ubuntu and Debian, on Fedora only the socket is enabled by default in the distribution presets. Other distros are DIY mostly, enable when you feel like it.

i use Debian i remember i have install in same system before and it work well

Can you attach the output of systemctl status snapd.socket snapd.service ?

here
`● snapd.socket - Socket activation for snappy daemon
Loaded: loaded (/lib/systemd/system/snapd.socket; disabled; vendor preset: disabled)
Active: inactive (dead)
Triggers: ● snapd.service
Listen: /run/snapd.socket (Stream)
/run/snapd-snap.socket (Stream)

● snapd.service - Snap Daemon
Loaded: loaded (/lib/systemd/system/snapd.service; disabled; vendor preset: disabled)
Active: inactive (dead)
TriggeredBy: ● snapd.socket`

here more`mon
cket; disabled; vendor preset: disabled)

rvice; disabled; vendor preset: disabled)
`

Looks like both are disabled (and the preset sets them to disabled as well). It should be enough to run systemctl enable --now snapd.socket so that snapd gets started on demand the next time you run snap command.

@degville do the Debian install notes need an update to reflect that a manual step may be needed?

1 Like

It looks like it, yes - I’ll check with my own Debian install and update accordingly. Thanks for letting me know.

For the record, can you attach the output of snap version ?

I’ve just run through a fresh Debian 10 install (in a VM) and our snapd install instructions still work for me without needing to enable snapd manually.

$ snap version
snap     2.45.2
snapd    2.45.2
series   16
debian   10
kernel 4.19.0-9-amd64

So it’s consistent with what I see on Sid. No clue why it’d be any different on OP’s system though.