I'm trying to host an apache2 server on my RasPi, but I can't seem to even complete the first step of updating all the software. Here's the error message:

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

Err http://mirrordirector.raspbian.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://archive.raspberrypi.org/debian/dists/jessie/Release.gpg  Could not resolve 'archive.raspberrypi.org'

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

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

I installed Raspbian from NOOBS just yesterday, so I think I'm already up to date, but I am still very lost.

EDIT: /etc/resolv.conf and ifconfig

eth0      Link encap:Ethernet  HWaddr b8:27:eb:06:21:c7
      inet addr:  Bcast:  Mask:
      inet6 addr: fe80::142:63fc:b304:5620/64 Scope:Link
      RX packets:3701 errors:0 dropped:4 overruns:0 frame:0
      TX packets:1266 errors:0 dropped:0 overruns:0 carrier:0
      collisions:0 txqueuelen:1000
      RX bytes:330709 (322.9 KiB)  TX bytes:222832 (217.6 KiB)

lo        Link encap:Local Loopback
      inet addr:  Mask:
      inet6 addr: ::1/128 Scope:Host
      UP LOOPBACK RUNNING  MTU:65536  Metric:1
      RX packets:576 errors:0 dropped:0 overruns:0 frame:0
      TX packets:576 errors:0 dropped:0 overruns:0 carrier:0
      collisions:0 txqueuelen:0
      RX bytes:46904 (45.8 KiB)  TX bytes:46904 (45.8 KiB)

/etc/resolv.conf doesn't seem to be holding anything. I just get this:

#Generated by resolvconf
  • 1
    Are you connected to the internet? Can you view the google homepage in a browser? What is the output of ifconfig? Dec 21, 2015 at 19:27
  • Its connected directly to the ethernet port, and right now I am accessing it through SSH on PuTTY. I believe the connection is fine.
    – Modjular
    Dec 21, 2015 at 19:31
  • Wait a sec. I can't resolve google.com.
    – Modjular
    Dec 21, 2015 at 19:32
  • 1
    Have a look at the answer here regarding DNS: raspberrypi.stackexchange.com/q/32849/5538 If this is the problem please let us know.
    – goldilocks
    Dec 21, 2015 at 19:47
  • 1
    Your modem/router may be able to furnish your Pi with a fixed IP if it is told to reserve one for the MAC that the Pi presents for wired ethernet port or that of a wireless dongle... and you'll have to tell it to port forward to that address anyhow.
    – SlySven
    Dec 21, 2015 at 21:01

1 Answer 1


I've had this problem earlier today on my Raspberry Pi. It seems you aren't connected to the internet.

I've recently answered a very similar question; Cannot connect Pi 3 to internet, but I'll put my answer in here too.

Try connecting a display to it, as well as any USB keyboard. Once you have done that, startup your Pi by connecting any Micro-USB cable to your Pi. If you cannot connect a display to your Pi, connect it to your router via Ethernet and connect it to your keyboard and power supply.


sudo apt-get install ssh

Download and install Putty, and I recommend using Fing on the App store to locate your Pi's IP address. When that's done, insert the IP address of your PI into Putty, and continue on to the next steps.

Login (if prompted):

Username: pi

Password: raspberry


sudo nano /etc/network/interfaces

Make sure your screen looks like this, if not type it in.


When you're done doing that, press Control+X, type y, and press enter.

Now, for the final part, type:

sudo nano /etc/wpa_supplicant/wpa_supplicant.conf

This time, add the following to the file:

    ssid="Network Name"
    psk="Network Password"

Tip: the name and password is case sensitive, so type it exactly as it appears.

When you're done, press Control+X, type y, and press enter again. Now you're ready, type sudo reboot now and now you can try to update your Pi. I also recommend after you update it, to type sudo apt-get install upgrade -y.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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