katesfb
Posts: 20
Joined: Tue Aug 14, 2012 4:17 am

apt-get not working but internet OK

Mon Feb 25, 2013 11:38 pm

Hi,
I seem to be having trouble getting apt-get to work. I get the following error:

Could not connect to mirrordirector.raspbian.org:80 (89.16.177.202). - connect (110: Connection timed out).

The internet itself seems OK for example searching with midori works fine. There have been some posts that suggest a bad or corrupted card however the card is brand new and has been expanded to 4GB using raspi-config tool.

Is there a fix for this?

Any help is much appreciated.

Cheers.

Mobius
Posts: 238
Joined: Thu Aug 30, 2012 1:07 am
Location: San Angelo, Texas USA

Re: apt-get not working but internet OK

Tue Feb 26, 2013 12:24 am

You don't say what you are trying to get via the apt-get command. That response sounds like the package is no longer available. I had something similar happen when I tried to install Motion and was told to do an update first. The logic being that the updated distro would know to point to the new mirror for the desired package. The basic commands for an update are "sudo apt-get update" followed by "sudo apt-get dist-upgrade".

katesfb
Posts: 20
Joined: Tue Aug 14, 2012 4:17 am

Re: apt-get not working but internet OK

Tue Feb 26, 2013 5:16 am

Hi,
And thanks for the reply. I actually get the error after trying to do an update "sudo apt-get update".

Any ideas?

Cheers.

SirLagz
Posts: 1705
Joined: Mon Feb 20, 2012 8:53 am
Location: Perth, Australia
Contact: Website

Re: apt-get not working but internet OK

Tue Feb 26, 2013 6:50 am

Not behind a firewall are you ?
Sounds like the Pi can't connect to the servers to retrieve data.
My Blog - http://www.sirlagz.net
Visit my blog for Tips, Tricks, Guides and More !
WiFi Issues ? Have a look at this post ! http://www.raspberrypi.org/phpBB3/viewtopic.php?f=28&t=44044

katesfb
Posts: 20
Joined: Tue Aug 14, 2012 4:17 am

Re: apt-get not working but internet OK

Tue Feb 26, 2013 8:28 am

Hi SirLagz,
Thanks for the reply. Not behind a firewall (i think - i'll check that) but i do have to use a proxy (have to setup an apt.conf file in /etc/apt with a couple of entries in it and add an entry to /home/pi/.bashrc) but this is set up exactly the same as on my first Pi (256 MB one) and this works fine. So i cant think what i've missed unless something has changed on the 512Mb pi.

If it was the firewall, wouldn't that effect the internet as well and isnt the firewall turned off by default on the Pi.

There's probably something fundamental that i am missing relative to the proxy maybe.

Cheers.

SirLagz
Posts: 1705
Joined: Mon Feb 20, 2012 8:53 am
Location: Perth, Australia
Contact: Website

Re: apt-get not working but internet OK

Wed Feb 27, 2013 2:24 am

Could be the proxy.
Proxy isn't set to only allow traffic from certain mac/ip addresses is it ?
My Blog - http://www.sirlagz.net
Visit my blog for Tips, Tricks, Guides and More !
WiFi Issues ? Have a look at this post ! http://www.raspberrypi.org/phpBB3/viewtopic.php?f=28&t=44044

katesfb
Posts: 20
Joined: Tue Aug 14, 2012 4:17 am

Re: apt-get not working but internet OK

Fri Mar 01, 2013 11:01 am

Hi,
Found the problem, on the latest version of wheezy that i have (Feb 2013) it was necessary to set up a small script in /etc/apt/apt.conf.d/01proxy with the proxy info, once that was done all went fine.

Cheers.

Iceshadow
Posts: 4
Joined: Sun Mar 17, 2013 11:53 am

Re: apt-get not working but internet OK

Sun Mar 17, 2013 11:56 am

can someone provide more info on the solution please

Return to “Beginners”