0

My machine is situated behind a Proxy (not sure what type, accessible via http, no user credentials required) which is automatically configured.

I'm connected to the internet but only firefox seems to be able to resolve URLs. APT does not.

So it seems like the proxy lets firefox resolve names but not other apps? Is it possible to somehow configure apt to circumvent this limitation?

When I enter the IP address of de.archive.ubuntu.com manually in the sources.list, I get an "no route to host" error.

As of now, the proxy server is configured with Ubuntus network settings gui.

Ouptut of apt:

Err:1 http://security.ubuntu.com/ubuntu cosmic-security InRelease
  Something wicked happened resolving 'security.ubuntu.com:http' (-5 - No address associated with hostname)

Err:2 http://de.archive.ubuntu.com/ubuntu cosmic InRelease
  Something wicked happened resolving 'de.archive.ubuntu.com:http' (-5 - No address associated with hostname)

Err:3 http://de.archive.ubuntu.com/ubuntu cosmic-updates InRelease
  Something wicked happened resolving 'de.archive.ubuntu.com:http' (-5 - No address associated with hostname)

Err:4 http://de.archive.ubuntu.com/ubuntu cosmic-backports InRelease
  Something wicked happened resolving 'de.archive.ubuntu.com:http' (-5 - No address associated with hostname)

Reading package lists... Done

Building dependency tree

Reading state information... Done

All packages are up to date.

W: Failed to fetch http://de.archive.ubuntu.com/ubuntu/dists/cosmic/InRelease  Something wicked happened resolving 'de.archive.ubuntu.com:http' (-5 - No address associated with hostname)

W: Failed to fetch http://de.archive.ubuntu.com/ubuntu/dists/cosmic-updates/InRelease  Something wicked happened resolving 'de.archive.ubuntu.com:http' (-5 - No address associated with hostname)

W: Failed to fetch http://de.archive.ubuntu.com/ubuntu/dists/cosmic-backports/InRelease  Something wicked happened resolving 'de.archive.ubuntu.com:http' (-5 - No address associated with hostname)

W: Failed to fetch http://security.ubuntu.com/ubuntu/dists/cosmic-security/InRelease  Something wicked happened resolving 'security.ubuntu.com:http' (-5 - No address associated with hostname)

W: Some index files failed to download. They have been ignored, or old ones used instead.
1
  • Check your firefox preferences to find out the exact type of proxy. A rule can be added to apt.conf.d to acquire a particular type of proxy connection. May 9, 2019 at 6:55

1 Answer 1

0

Firefox (like other browsers) has its own internal proxy settings. CLI applications such as apt-get don't see this, they rely on an http_proxy (yes, lowercase, AFAIK) environment variable:

export http_proxy="http://PROXY_SERVER:PORT"
2
  • Unfortunately it didn't work. I entered the proxy server in Ubuntus wired network settings, not only in firefox.
    – Markus
    Apr 29, 2019 at 11:06
  • Did you check that the http_proxy value appeared in your environment? Me, I would use http_proxy="http://PROXY_SERVER:PORT" apt-get install ....
    – xenoid
    Apr 29, 2019 at 11:55

Not the answer you're looking for? Browse other questions tagged .