Apt error: Temporary failure resolving ''

Posted July 24, 2017 110.1k views
DebianSystem 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 stretch InRelease
Temporary failure resolving ‘’
Err:2 stretch/updates InRelease
Temporary failure resolving '’
Err:3 stretch-updates InRelease
Temporary failure resolving '’
Reading package lists… Done
W: Failed to fetch Temporary failure resolving '’
W: Failed to fetch Temporary failure resolving '’
W: Failed to fetch Temporary failure resolving '’
W: Some index files failed to download. They have been ignored, or old ones used instead.

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

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

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

Submit an Answer
8 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 ‘"
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 A

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…

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:


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