1

I'm trying to set the http/https_proxy values in apt.conf so that sudo apt-get will work for a proxy that I'm behind.

In /etc/apt/apt.conf:

Acquire::http_proxy::proxy "http://proxy.***.*****.com:8000/";
Acquire::https_proxy::proxy "http://proxy.***.*****.com:8000/";

When I run sudo apt-get update, it unfortunately times out saying it can't find the server.

However, when I execute apt-get update through this command:

sudo bash -c 'http_proxy="http://proxy.***.*****.com:8000" apt-get update'

sudo apt-get does work. I found that command from: How to run "sudo apt-get update" through proxy in commandline?

I also tried adding:

Defaults env_keep = "http_proxy htps_proxy" in '/etc/sudoers' or visudo.

I found this here:

How to run "sudo apt-get update" through proxy in commandline?

What am I doing wrong? I apologize for asking this as similar questions were already asked, but I can't solutions I've seen to work.

2

It's your syntax in the /etc/apt/apt.conf file.

Try this:

Acquire::http::Proxy "http://address.com:port";

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.