Linux Archive

Linux Archive (http://www.linux-archive.org/)
-   Debian User (http://www.linux-archive.org/debian-user/)
-   -   Problem with apt-get -- (http://www.linux-archive.org/debian-user/398567-problem-apt-get.html)

PRAKHAR gaur 07-13-2010 12:59 PM

Problem with apt-get --
 
Dear Liam,

>Probably one of your configuration files was replaced during the upgrade. The original will have been preserved with the extension
>.dpkg-old.
I installed the OS again, did not upgrade it.
*
>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.
Here is the output, first in normal user and then as root.

prakhar@ibab-stud021:~$ sudo apt-get update
Err http://volatile.debian.org lenny/volatile Release.gpg
Cannot initiate the connection to volatile.debian.org:80 (2001:858:2:2::2). - connect (101 Network is unreachable) [IP: 2001:858:2:2::2 80]
Err http://volatile.debian.org lenny/volatile/main Translation-en_IN
Cannot initiate the connection to volatile.debian.org:80 (2001:858:2:2::2). - connect (101 Network is unreachable) [IP: 2001:858:2:2::2 80]
Err http://volatile.debian.org lenny/volatile/contrib Translation-en_IN
Cannot initiate the connection to volatile.debian.org:80 (2001:858:2:2::2). - connect (101 Network is unreachable) [IP: 2001:858:2:2::2 80]
Ign http://volatile.debian.org lenny/volatile Release
Ign http://volatile.debian.org lenny/volatile/main Packages/DiffIndex
Ign http://volatile.debian.org lenny/volatile/contrib Packages/DiffIndex
Ign http://volatile.debian.org lenny/volatile/main Sources/DiffIndex
Ign http://volatile.debian.org lenny/volatile/contrib Sources/DiffIndex
Ign http://volatile.debian.org lenny/volatile/main Packages
Ign http://volatile.debian.org lenny/volatile/contrib Packages
Ign http://volatile.debian.org lenny/volatile/main Sources
Ign http://volatile.debian.org lenny/volatile/contrib Sources
Ign http://volatile.debian.org lenny/volatile/main Packages
Ign http://volatile.debian.org lenny/volatile/contrib Packages
Ign http://volatile.debian.org lenny/volatile/main Sources
Ign http://volatile.debian.org lenny/volatile/contrib Sources
Err http://volatile.debian.org lenny/volatile/main Packages
Cannot initiate the connection to volatile.debian.org:80 (2001:858:2:2::2). - connect (101 Network is unreachable) [IP: 2001:858:2:2::2 80]
Err http://volatile.debian.org lenny/volatile/contrib Packages
Cannot initiate the connection to volatile.debian.org:80 (2001:858:2:2::2). - connect (101 Network is unreachable) [IP: 2001:858:2:2::2 80]
Err http://volatile.debian.org lenny/volatile/main Sources
Cannot initiate the connection to volatile.debian.org:80 (2001:858:2:2::2). - connect (101 Network is unreachable) [IP: 2001:858:2:2::2 80]
Err http://volatile.debian.org lenny/volatile/contrib Sources
Cannot initiate the connection to volatile.debian.org:80 (2001:858:2:2::2). - connect (101 Network is unreachable) [IP: 2001:858:2:2::2 80]
23% [Connecting to http.us.debian.org (35.9.37.225)] [Connecting to security.debian.org (195.20.242.89)]^C

prakhar@ibab-stud021:~$ su
Password:
ibab-stud021:/home/prakhar# apt-get update
Get:1 http://http.us.debian.org lenny Release.gpg [1033B]
Get:2 http://security.debian.org lenny/updates Release.gpg [835B]
Get:3 http://volatile.debian.org lenny/volatile Release.gpg [481B]
Ign http://http.us.debian.org lenny/main Translation-en_IN
Ign http://security.debian.org lenny/updates/contrib Translation-en_IN
Ign http://http.us.debian.org lenny/contrib Translation-en_IN
Ign http://security.debian.org lenny/updates/non-free Translation-en_IN
Ign http://volatile.debian.org lenny/volatile/main Translation-en_IN
Ign http://http.us.debian.org lenny/non-free Translation-en_IN
Ign http://security.debian.org lenny/updates/main Translation-en_IN
Ign http://volatile.debian.org lenny/volatile/contrib Translation-en_IN
Hit http://http.us.debian.org lenny Release
Hit http://security.debian.org lenny/updates Release
Hit http://volatile.debian.org lenny/volatile Release
Ign http://http.us.debian.org lenny/main Packages/DiffIndex
Ign http://security.debian.org lenny/updates/contrib Packages/DiffIndex
Ign http://http.us.debian.org lenny/contrib Packages/DiffIndex
Ign http://security.debian.org lenny/updates/non-free Packages/DiffIndex
Ign http://volatile.debian.org lenny/volatile/main Packages/DiffIndex
Ign http://http.us.debian.org lenny/non-free Packages/DiffIndex
Ign http://security.debian.org lenny/updates/main Packages/DiffIndex
Ign http://volatile.debian.org lenny/volatile/contrib Packages/DiffIndex
Hit http://http.us.debian.org lenny/main Packages
Hit http://security.debian.org lenny/updates/contrib Packages
Ign http://volatile.debian.org lenny/volatile/main Sources/DiffIndex
Hit http://http.us.debian.org lenny/contrib Packages
Hit http://security.debian.org lenny/updates/non-free Packages
Ign http://volatile.debian.org lenny/volatile/contrib Sources/DiffIndex
Hit http://http.us.debian.org lenny/non-free Packages
Hit http://security.debian.org lenny/updates/main Packages
Hit http://volatile.debian.org lenny/volatile/main Packages
Hit http://volatile.debian.org lenny/volatile/contrib Packages
Hit http://volatile.debian.org lenny/volatile/main Sources
Hit http://volatile.debian.org lenny/volatile/contrib Sources
Fetched 2349B in 5s (425B/s)
Reading package lists... Done

--
Prakhar Gaur

Sjoerd Hardeman 07-13-2010 01:38 PM

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 gaur 07-13-2010 05:12 PM

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.

PRAKHAR gaur 07-13-2010 06:23 PM

Problem with apt-get --
 
From: prakhar_aaidu16@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: 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.
_ _ _ _ _ _ _ _ _
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://ibab@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

Sjoerd Hardeman 07-13-2010 09:02 PM

Problem with apt-get --
 
Op 13-07-10 19:12, PRAKHAR gaur schreef:
> --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/"
Try adding it in /etc/bash.bashrc. That should work for all users.

Good luck!


All times are GMT. The time now is 08:19 AM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.