Invalid port (after host)

Hello I used the following command to set up a proxy

sudo snap set system proxy.https=“http://<proxy_addr>:<proxy_port>”

And when installing sudo snap install hello-world Shows this error!!

sudo snap install hello-world
error: cannot install “hello-world”: Post”: parse
“http://<proxy_addr>:<proxy_port>”: invalid port
“:<proxy_port>” after host

Hi @biroghlan, and welcome!

The reason for that is, in the command:

sudo snap set system proxy.https=“http://<proxy_addr>:<proxy_port>”

You should have replaced http://<proxy_addr>:<proxy_port> with your actual proxy values:

  • the http:// for your proxy protocol;
  • <proxy_addr> with the address, either the hostname or the IP address where thee proxy can be reached; and
  • <proxy_port> with the port the proxy server i8s listening on. This is typically ‘3306’ for squid.

You need to know what these are to set them up. If you do not know, you can typically as your network administrator what they are. If you’re connected VIA a typical internet connection you probably don’t have or need a proxy server.

Hope this helps!

Thank you i can delete it, I do not need it?

That would typically be safe, but I can’t say for sure if I don’t know more about your setup. However, I suspect it might.

If something breaks because of this, I’m not responsible, by the way.

List proxy

$ sudo snap get system proxy

Key Value
proxy.http http://<proxy_addr>:<proxy_port>
proxy.https http://<proxy_addr>:<proxy_port>

how can remove all?

  1. Next time you post, when including terminal output, after you’ve pasted it, select it and click the </> button in the toolbar here. It just formats it better, makes it easier to read for the people trying to help.
    Alternativelly, wrap the text, one line at the top before and one line at the bottom after, each containing only 3 backticks (```).
  2. I have absolutely no idea. Perhaps someone else does know, but it’s not me. Sorry.

Ok, thank you :pray: