Skip to main content
1 of 6
rubynorails
  • 2.4k
  • 17
  • 25

It looks like your machine is trying to resolve a host literally named proxy_server. Try ping -c 5 proxy_server to see if it has an IP listed and if you can hit it over ICMP. If you are indeed wanting to use a proxy, then check for that IP in /etc/hosts, or just grep 'proxy_server' /etc/hosts, and make sure you can connect to the IP listed for proxy_server via TCP using telnet proxy_server [port] or nc proxy_server:[port]. The port will usually be 8080 for HTTP or 1080 for SOCKS, but can really be set to anything. You would get the port information from your apt config files, in steps detailed below.

If you can ping proxy_server, then make sure that proxy is working correctly and listening on the correct ports that you have listed in any files under /etc/apt. To list these files, run grep -rl 'proxy_server' /etc/apt.

If you aren't intending to use a proxy to connect, then grep -rl 'proxy_server' /etc/apt to see which files list that string. To remove all lines containing that string, run grep -rl 'proxy_server' /etc/apt | sed -i '/proxy_server/d', and try again.

If there are no files listed in the grep output, then run unset http_proxy; unset https_proxy, and try again.

rubynorails
  • 2.4k
  • 17
  • 25