Friday, April 26, 2024
 Popular · Latest · Hot · Upcoming
70
rated 0 times [  70] [ 0]  / answers: 1 / hits: 626933  / 2 Years ago, fri, july 8, 2022, 7:46:41

Possible Duplicate:

apt-get does not work with proxy






I have tried changing my proxy settings in a terminal as:



export HTTP_PROXY=http://10.1.3.1:8080


and



export http_proxy=http://10.1.3.1:8080


but when I try to install a new package or update apt-get, apt-get starts displaying messages from which it seems it is trying to connect to a previously set proxy:



sudo apt-get update  
0% [Connecting to 10.1.2.2 (10.1.2.2)] [Connecting to 10.1.2.2 (10.1.2.2)


I have tried setting the proxy via bashrc file but that din work either. As far as I remember 10.1.2.2 was set using GNOME GUI but I don't have access to the GUI right now so I am trying to set it from terminal.


More From » apt

 Answers
3

Okay just solved it. Adding following line to /etc/apt/apt.conf has solved the problem:
Acquire::http::proxy "http://10.1.3.1:8080/";



If file does not exist, create it. Do not confuse it with apt.conf.d directory.


[#37148] Saturday, July 9, 2022, 2 Years  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.
breadoules

Total Points: 212
Total Questions: 118
Total Answers: 120

Location: Dominica
Member since Mon, Jun 22, 2020
4 Years ago
;