[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Problem with apt-get --



--Forwarded Message Attachment--
Date: Tue, 13 Jul 2010 15:38:41 +0200
From: sjoerd@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

prakhar@ibab-stud021:~$ echo $http_proxy
http://proxy.ibab.ac.in:3128/
prakhar@ibab-stud021:~$ su -
Password:
ibab-stud021:~# echo $http_proxy

ibab-stud021:~# exit
logout
prakhar@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.

Reply to: