Page 1 of 1

Xubuntu 20.04 & snap: "127.0.0.1:443: connect: connection refused"

Posted: Fri Nov 15, 2024 10:04 pm
by peter_b
[PROBLEM]

Code: Select all

sudo snap install btop
[sudo] password for user:
error: cannot install "btop": Post "https://api.snapcraft.io/v2/snaps/refresh": dial tcp
127.0.0.1:443: connect: connection refused
[SOLUTION]
I had the following lines in my "/etc/hosts":

Code: Select all

# Hack to disable automatic snap updates:
127.0.0.1	api.snapcraft.io
Well... To literally disable automatic updates. I really like my setups stable and well-known.
Anyways: Disable the localhost-loopback line, and the above command will work as expected again.
(Don't forget to re-enable the loopback afterwards, to disable auto-updates ;))