From: prakhar_aaid...@hotmail.com To: debian-user@lists.debian.org Subject: Re: Problem with apt-get -- Date: Tue, 13 Jul 2010 22:42:21 +0530
--Forwarded Message Attachment-- Date: Tue, 13 Jul 2010 15:38:41 +0200 From: sjo...@lorentz.leidenuniv.nl To: debian-user@lists.debian.org Subject: Re: Problem with apt-get -- PRAKHAR gaur schreef: >>>You might also add: >>>export ftp_proxy=$http_proxy >> >> Ok. >> >> But now there is a slight problem, when ever I use "sudo apt-get update", >> it does not work. but if I become root first, using "su", and then so the >> same thing, it works. >> I tried closing all the terminals and opening them again, didn't work. >Can you do a "echo $http_proxy" both as root and as user? I guess >$http_proxy isn't set properly for your user (and sudo uses user-values >for its config) >Sjoerd prak...@ibab-stud021:~$ echo $http_proxy http://proxy.ibab.ac.in:3128/ prak...@ibab-stud021:~$ su - Password: ibab-stud021:~# echo $http_proxy ibab-stud021:~# exit logout prak...@ibab-stud021:~$ su Password: ibab-stud021:/home/prakhar# echo $http_proxy http://proxy.ibab.ac.in:3128/ Notice the difference of output between "su -" and "su". I had read that "su -" loads that root user environment, and just "su" works with the current user environment only. Additionally to answer your query, in both user and root the $http_proxy variable is set correctly. I have done the same modifications to the user ~/.bashrc file, ie. added the line export http_proxy="http://proxy.ibab.ac.in:3128/" Well that's what all I did, please help me out. _ _ _ _ _ _ _ _ _ Dear All, Have a interesting update and potentially the solution of the problem. I have another system running Debian 5.0.5 ,same hard ware configuration. It had the same problem, while reading about apt on Wikipedia, got to know about the command apt-config dump and the file "/etc/apt/apt.conf" I ran the command on the other system, and the proxy was entered incorrectly(I did not do that) I checked out the file "apt.conf" on my other system, it had only one line, Acquire::http::Proxy "http://i...@ibab:3128"; Hence I corrected it to, Acquire::http::Proxy "http://ibab.ac.in:@proxy.ibab.ac.in:3128"; and now every thing is fine. But funnily enough, when tryiny to correct the same file on my own system, There was no "/etc/apt/apt.conf" file. Hence created that file and just put the above line in it. apt-get is working fine now. Wonder why there was no "/etc/apt/apt.conf" file present??? Thanks to everyone for the help, Prakhar Gaur