cannot communicate with server: Post http://localhost/v2/snaps/discord: dial unix /run/snapd.socket: connect: connection refused

Viewed 12284

I want to install discord via snap (Linux package format), but i get the following error:

cannot communicate with server: Post http://localhost/v2/snaps/discord: dial unix /run/snapd.socket: connect: connection refused

Don't know why ...

5 Answers

Maybe you don't have the snad service running

To start it onetimes do:

sudo systemctl start snapd

To enable that it always start with your system do:

sudo systemctl enable snapd

Unmask it:

sudo systemctl unmask snapd.service

Enable it:

sudo systemctl enable snapd.service

Start it:

sudo systemctl start snapd.service

I've been having the same issue for some time now.
I solved the issue by uninstalling snap and then reinstalling it:

$ sudo apt autoremove --purge snapd
$ sudo apt install snapd

This issue came to me because i changed permission to 777 I searched every where and I find only this solution is best sudo apt-get purge snapd sudo apt-get install snapd

This issue came when i was trying to install spotify on my kali machine using snap "snapd" so this issue can be solved with the following commands on the terminal Firstly install snap **$ sudo apt install snapd** or remove it by **$ sudo apt autoremove --purge snapd** then install it again Then enter the following commands

$ sudo systemctl enable snapd`
$ sudo systemctl start snapd 
$ sudo snap install spotify

you should be able to download spotify on your kali/ubuntu Machine

Related