Apt error: Temporary failure resolving 'deb.debian.org'

July 24, 2017 50.1k views
Debian System Tools

Apt is throwing a dns error. :(

This is digitalocean’s image, and I haven’t done anything on it yet. (Other than changing the dns servers from google to opendns, didn’t work with google’s dns servers either).

Err:1 http://deb.debian.org/debian stretch InRelease
Temporary failure resolving ‘deb.debian.org’
Err:2 http://security.debian.org stretch/updates InRelease
Temporary failure resolving 'security.debian.org’
Err:3 http://deb.debian.org/debian stretch-updates InRelease
Temporary failure resolving 'deb.debian.org’
Reading package lists… Done
W: Failed to fetch http://deb.debian.org/debian/dists/stretch/InRelease Temporary failure resolving 'deb.debian.org’
W: Failed to fetch http://security.debian.org/dists/stretch/updates/InRelease Temporary failure resolving 'security.debian.org’
W: Failed to fetch http://deb.debian.org/debian/dists/stretch-updates/InRelease Temporary failure resolving 'deb.debian.org’
W: Some index files failed to download. They have been ignored, or old ones used instead.

root@leobuilt:~# ping deb.debian.org
PING static.debian.org ( 56(84) bytes of data.
64 bytes from senfter.debian.org ( icmpseq=1 ttl=49 time=154 ms
64 bytes from senfter.debian.org ( icmp
seq=2 ttl=49 time=153 ms

root@leobuilt:~# cat /etc/resolv.conf

7 Answers

… to be continued. I got droplet working after I realized that /etc/resolv.conf had rw+rw— permissions. Giving a command: chmod o+r /etc/resolv.conf helped me to get all done and working nicely. Hope this helps.

I have got the problem" Temporary failure resolving ‘deb.debian.org"
i tried chmod o+r /etc/resolv.conf but its says operation not permitted. what should i do to make it work.


It might be a temporary glitch at Debian. Which data center are you using?
Try this command to lookup just the domain:

dig deb.debian.org A

Sort of a problem, digitalocean’s image doesn’t come with dnsutils installed, and I can’t get it due to apt problem.

We had the same problems today with droplets on which we used the rebuild feature to upgrade the base image. Newly created droplets were not affected but all Droplets which we upgraded from an older Debian version to Debian 9 were affected. The only workaround we found so far is to rebuild the machine with the Debian 8.9 base image and then upgrade the OS manually:


I have exactly same problem here. The droplet I have build before (debian 9.0) is working nicely (FRA1 data center), but the droplet I rebuilded today (debian 9.1, FRA1) can’t ‘resolve anything’ using apt-get or aptitude. It’s amazing becouse ping and wget are still working fine to the same addressess. I’m also able to use ssh. So I think it isn’t a network problem, but an issue of apt.

I can work now with the other droplet for couple of days, but I would appreciate any workaround there…

Good question! I sorta solved it by just installing Arch Linux.

  • Will you be please more clear....

  • Switching Linux flavors is not really recommended. But reinstalling – either the same distribution, different distribution, or other OS such as Windows or Mac – are valid way to solve this type of issue.

    chmod o+r resolv.conf was helpful! Thank you @adesh7!

Have another answer? Share your knowledge.

You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!