LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking
User Name
Password
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.

Notices


Reply
  Search this Thread
Old 04-15-2014, 03:12 AM   #1
just-a-guest
LQ Newbie
 
Registered: Apr 2014
Distribution: Archlinux
Posts: 18

Rep: Reputation: Disabled
Apt-get: Network is unreachable


I am on a Kubuntu behind a proxy and I'm trying to make sudo apt-get update. The apt-get says
Quote:
Cannot initiate the connection to ru.archive.ubuntu.com:80 (2a02:6b8::183). - connect (101: Network is unreachable) [IP: 2a02:6b8::183 80]
The problem is that this error is really weird, because:
1) I configured proxy in system settings.
2) I suppose, that apt-get can't handle this settings, so I tried to configure proxy for an apt-get through an export as follows:
Quote:
export http_proxy=10.5.57.177:3128
export https_proxy=10.5.57.177:3128
export ftp_proxy=10.5.57.177:3128
And when it doesn't worked, I tried this:
Quote:
export http_proxy=http://10.5.57.177:3128
export https_proxy=https://10.5.57.177:3128
export ftp_proxy=ftp://10.5.57.177:3128
But nothing get worked

Last edited by just-a-guest; 04-15-2014 at 03:25 AM.
 
Old 04-15-2014, 04:33 AM   #2
just-a-guest
LQ Newbie
 
Registered: Apr 2014
Distribution: Archlinux
Posts: 18

Original Poster
Rep: Reputation: Disabled
Hmm, I found a strange thing: the apt-get works through a netbook with an installed Ubuntu. So I tried to copy sources.list(though it's pretty the same, the only difference is the release name: precise VS saucy), but it doesn't worked anyway.
I hope I'm close... «The Truth Is Out There» =)
 
Old 04-15-2014, 06:41 AM   #3
just-a-guest
LQ Newbie
 
Registered: Apr 2014
Distribution: Archlinux
Posts: 18

Original Poster
Rep: Reputation: Disabled
Aha! Through comparing tcpdump output on a netbook and PC, I found a next hint: all output of the netbook goes through a 3128 port -- it's a proxy. On a desktop that's also true for webpages, but not for an apt-get.
This also means that export http_proxy= doesn't work, although it should, so an apt-get is buggy.
Anyway, despite the broken apt-get there's sure a way to get it work, as apt-get on a netbook working without dark magic with an "export".
 
Old 04-15-2014, 07:00 AM   #4
TobiSGD
Moderator
 
Registered: Dec 2009
Location: Germany
Distribution: Whatever fits the task best
Posts: 17,148
Blog Entries: 2

Rep: Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886
apt-get has its own configuration file for proxy settings: http://www.debian-administration.org/articles/177
 
Old 04-15-2014, 07:14 AM   #5
just-a-guest
LQ Newbie
 
Registered: Apr 2014
Distribution: Archlinux
Posts: 18

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by TobiSGD View Post
apt-get has its own configuration file for proxy settings: http://www.debian-administration.org/articles/177
This is true, but this is a permanent settings. They wrote in a manual that I can set a temporary proxy settings through an export and they're lying as you're can see =) I don't think that a permanent settings going to work, if a temporary doesn't.
 
Old 04-15-2014, 07:57 AM   #6
just-a-guest
LQ Newbie
 
Registered: Apr 2014
Distribution: Archlinux
Posts: 18

Original Poster
Rep: Reputation: Disabled
Finally I get it to work! Tell me, do anybody see which one of two lines below is going to guide me to the success?
Quote:
constantine@constantine-desktop:~$ echo $http_proxy
Quote:
constantine@constantine-desktop:~$ echo $http_proxy
http://10.5.57.177:3128
Yes, you're right, the second one is wrong. To be precicer it's just unnecessary line, it looks like a ghost: it was mentioned everywhere but doesn't seems that something depends on this line.
The solution was to add the line http_proxy="http://10.5.57.177:3128" to the /etc/environment/. When an apt-get launched it's parses this file and this line too.
This blog post very helped me, thank him very much!
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Ideologues and Idiots jiml8 General 7 06-30-2010 09:40 AM
because idiots are always funny... St.Jimmy General 5 02-18-2007 08:13 PM
Networking for idiots? Bonowannabe Linux - Networking 6 08-27-2004 09:32 AM
apt for idiots Big Bang Hank Fedora 1 07-23-2004 04:30 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Networking

All times are GMT -5. The time now is 12:29 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration