0

I am trying to use Snapd to install an app. I enter in the following command:

sudo snap install hello-world

And the error message is:

error: cannot install “hello-world”: Post
https://api.snapcraft.io/v2/snaps/refresh: dial tcp: lookup
api.snapcraft.io on 127.0.0.1:53: write udp
127.0.0.1:36259->127.0.0.1:53: write: operation not permitted

I asked someone else for advice, and they recommended:

sudo snap set system proxy.http=http://127.0.0.1:9050

sudo snap set system proxy.https=http://127.0.0.1:9050

sudo systemctl restart snapd

sudo snap install hello-world

However, that didn't work either:

error: cannot install “hello-world”: Post
https://api.snapcraft.io/v2/snaps/refresh: proxyconnect tcp: dial tcp
127.0.0.1:9050: connect: connection refused

Does anyone have any advice? In general, I've had no problem connecting to the internet through the Tor browser... But connecting through the terminal has been extremely frustrating.

  • First of all, the advice that you friend gave is 100% wrong. Tor uses socks5 proxy and not an http or https proxy. Are you using Tails or another OS? You don't say and so it is very difficult to provide help without knowing what you are doing. – JSEvans Feb 20 at 7:48
0

This solution worked for me on Tails 4.5 :

sudo snap set system proxy.http=socks5://127.0.0.1:9050
sudo snap set system proxy.https=socks5://127.0.0.1:9050
sudo iptables -I OUTPUT 3 -d 127.0.0.1/32 -o lo -p tcp -m tcp --dport 9050 --tcp-flags FIN,SYN,RST,ACK SYN -m owner --uid-owner 0 -j ACCEPT

Source: https://forum.snapcraft.io/t/installing-snap-packages-with-tor/15527/7

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.