Comment 2 for bug 1005837

Revision history for this message
Torsten Hilbrich (torsten-hilbrich) wrote :

I get this error because downloads need to use a HTTP proxy. The system is configured to use the proxy (i.e. http_proxy environment variable is set) but this environment setting is not used when installing packages through the update-manager.

If I manually run

sudo -i /usr/lib/update-notifier/package-data-downloader

after I get this error everything works fine. The main difference is the -i flag to sudo which enables the normal system environment (containing the http_proxy variable) for the package-data-downloader.

http_proxy is set in /etc/environment:

http_proxy="http://proxy.example.com:3128/"

In addition, I got some proxy configuration in /etc/apt/apt.conf:

Acquire::http::proxy "http://proxy.example.com:3128/";
Acquire::ftp::proxy "ftp://proxy.example.com:3128/";
Acquire::https::proxy "https://proxy.example.com:3128/";
Acquire::socks::proxy "socks://proxy.example.com:3128/";

The fix was taken from https://bugs.launchpad.net/ubuntu/+source/update-notifier/+bug/983559
Also https://bugs.launchpad.net/ubuntu/+source/update-notifier/+bug/979477 seems to be related, however, there is a big mixup between honoring APT settings, system settings, allowing http_proxy to be passed via sudo, so I'm unsure if there is a duplicate bug situation or not.