So I got a pi 3.0 and it has been running a apache webserver with php just fine. I have not logged into it in a while. Today, however, I was planning to install openvpn which failed to install. So I figured let me just update it with apt-get update but it returned errors:

root@raspberrypi:/home/pi# apt-get update
Err http://mirrordirector.raspbian.org jessie InRelease

Err http://archive.raspberrypi.org jessie InRelease

Err http://mirrordirector.raspbian.org jessie Release.gpg
Could not resolve 'mirrordirector.raspbian.org'
Err http://archive.raspberrypi.org jessie Release.gpg
Could not resolve 'archive.raspberrypi.org'
Reading package lists... Done
W: Failed to fetch http://mirrordirector.raspbian.org/raspbian/dists/jessie/InRelease

W: Failed to fetch http://archive.raspberrypi.org/debian/dists/jessie/InRelease

W: Failed to fetch http://mirrordirector.raspbian.org/raspbian/dists/jessie/Release.gpg  Could not resolve 'mirrordirector.raspbian.org'

W: Failed to fetch http://archive.raspberrypi.org/debian/dists/jessie/Release.gpg  Could not resolve 'archive.raspberrypi.org'

W: Some index files failed to download. They have been ignored, or old ones used instead.

I am connected via ssh from a remote location and the webserver is still running.

P.S. when I ping google.com or any website it cannot resolve host name.

  • Your problem seems to be "when I ping google.com or any website it cannot resolve host name" not the update. How is the network configured on the Pi? DHCP? Static? Is the DNS server specified in the configuration?
    – techraf
    Sep 9, 2016 at 2:15
  • Have you found any answer which works for you? I think TechnicallyTroubled's answer is good one. Feb 27, 2017 at 14:11

2 Answers 2


You could also try and ping to see if you are actually able to get packets out to the internet. If you are then check your DNS settings as per cat /etc/resolv.conf

You would expect to see something like


Check that the DNS server in there is actually live and working. If not, edit it using something like nano, then see if it works.

If you cannot get packets out to the internet, check your internet settings.

  • Confirmed. The one line works and enables the connection issue. - - I had localhost address there myself. Feb 27, 2017 at 14:10

This may be a DNS issue. Verify if domain name servers are defined in the network configuration. Check using this command:

less /etc/resolv.conf

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.