junhaoliu
Posts: 1
Joined: Tue Mar 29, 2016 10:21 pm

About the [Waiting for headers]

Tue Mar 29, 2016 10:26 pm

Hi everyone,

I am new to raspberry pi, Just bought a raspberry pi 3 couple days ago, I am facing with a problem, can someone help me?
Problem:
When I type sudo apt-get update or something else,
It will always be: [waiting for headers], how to solve it?

Yours Sincerely!

User avatar
DougieLawson
Posts: 42483
Joined: Sun Jun 16, 2013 11:19 pm
Location: A small cave in deepest darkest Basingstoke, UK

Re: About the [Waiting for headers]

Tue Mar 29, 2016 10:47 pm

Get your network connected.

Start by looking at what's wrong
ip addr show
ip route
ping -c3 $(ip route | awk '/default/ {print $3}')
ping -c3 8.8.8.8
ping -c3 google.com
cat /etc/resolv.conf
ping -c3 mirrordirector.raspbian.org
Languages using left-hand whitespace for syntax are ridiculous

DMs sent on https://twitter.com/DougieLawson or LinkedIn will be answered next month.
Fake doctors - are all on my foes list.

The use of crystal balls and mind reading is prohibited.

levinor
Posts: 6
Joined: Wed Jul 06, 2016 8:06 pm

Re: About the [Waiting for headers]

Wed Jul 06, 2016 9:43 pm

DougieLawson wrote:Get your network connected.

Start by looking at what's wrong
ip addr show
ip route
ping -c3 $(ip route | awk '/default/ {print $3}')
ping -c3 8.8.8.8
ping -c3 google.com
cat /etc/resolv.conf
ping -c3 mirrordirector.raspbian.org
Hi,

I've the same problem with a raspberrypi 2. All the commands returned ok, even the ping to mirrordirector.raspbian.org. But when I try to update or install it gets stuck on waiting for headers.

I saw something strange, when trying to update it shows

Code: Select all

0% [Waiting for headers][Conecting to archive.raspberrypi.org]
But my /etc/apt/sources-list dont include archive.raspberrypi.org, it looks like this.

Code: Select all

deb http://mirrordirector.raspbian.org/raspbian jessie main contrib non-free rpi
deb-src http://archive.raspbian.org/raspbian jessie main contrib non-free rpi
EDIT: Nevermind, I was tired and didn't realized my original /etc/apt/sources-list was:

Code: Select all

deb http://archive.raspbian.org/raspbian jessie main contrib non-free rpi
deb-src http://archive.raspbian.org/raspbian jessie main contrib non-free rpi
Changing it to mirrordirector, and rebooting the raspberry, would work (yesterday night I couldn't try the install, just the update, but I think it would work too) just fine:

Code: Select all

deb http://mirrordirector.raspbian.org/raspbian jessie main contrib non-free rpi
deb-src http://archive.raspbian.org/raspbian jessie main contrib non-free rpi

User avatar
DougieLawson
Posts: 42483
Joined: Sun Jun 16, 2013 11:19 pm
Location: A small cave in deepest darkest Basingstoke, UK

Re: About the [Waiting for headers]

Thu Jul 07, 2016 5:51 pm

Good thread hijack. Start a new one. Or search for your problem (waiting for headers is a common FAQ).
https://www.google.co.uk/search?q=raspb ... or+headers
Languages using left-hand whitespace for syntax are ridiculous

DMs sent on https://twitter.com/DougieLawson or LinkedIn will be answered next month.
Fake doctors - are all on my foes list.

The use of crystal balls and mind reading is prohibited.

Return to “Beginners”