apt-get fails with raspberry pi although ping works

1

I'm trying to update and install stuff with my raspberry pi.

Unfortunately it's failing, and I get these errors when doing sudo apt-get update :

Err http://raspberrypi.collabora.com wheezy Release.gpg
 Could not resolve 'host'
Err http://mirrordirector.raspbian.org wheezy Release.gpg
 Could not resolve 'host'
Err http://archive.raspberrypi.org wheezy Release.gpg
 Could not resolve 'host'
Err http://repository.wolfram.com wheezy Release.gpg
 Could not resolve 'host'

And a few more lines like that...
The weird thing is that if I ping those addresses I get a response, so my DNS is probably ok:

ping mirrordirector.raspbian.org

Any other ideas why this would fail ? and of course, how can i fix this?

Yochai Timmer

Posted 2014-10-28T06:52:19.403

Reputation: 155

Answers

1

It happen to me also, I had this error message when running sudo apt-get update : "Could not resolve 'mirrordirector.raspbian.org'"

After analyzing what I did, I figure out that I run an : sudo apt-get autoremove && sudo apt-get autoclean This uninstalled required packages to connect to mirrordirector.raspbian.org :(

So to solve it, I ran :

sudo apt-get install libplrpc-perl libnet-daemon-perl

And now everything works ;)

marmotte31

Posted 2014-10-28T06:52:19.403

Reputation: 11

Thanks! That really saved me! – Stan – 2019-12-27T04:09:30.823

0

The only idea I have is something I recently discovered with a new Ubuntu server. That was the first time I managed to get a successful IPv6 installation working - only to discover that not all sources support IPv6 and so some were failing!

Disabling IPv6 support is the work-around for that problem so it might be worth trying?

Julian Knight

Posted 2014-10-28T06:52:19.403

Reputation: 13 389